Page MenuHomePhabricator

Right-click handler for section editing doesn't suppress context menu in all browsers
Closed, ResolvedPublic

Description

Author: bugzilla

Description:
In Firefox, if you enable the option to edit sections by right clicking them,
you still see the context menu. The handler returns false, which works in IE to
stop the event, but not other browsers. I've made this change to my
installation at line 574 with success:

if (targ.nodeName.toLowerCase() != 'a'

targ.parentNode.className != 'editsection') {
document.location = editHref;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return false;

}


Version: 1.10.x
Severity: minor

Details

Reference
bz9136

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:35 PM
bzimport set Reference to bz9136.
bzimport added a subscriber: Unknown Object (MLST).

Can you post a patch instead please ?

$ diff -u ourfile.js yourmodifiedfile.js > /tmp/me.patch

then send us the me.patch file :)

I can't reproduce this on Firefox 2.0.0.2 on Mac OS X or Windows XP.

bugzilla wrote:

wikibits.js diff file

I'm on a Windows system, so couldn't easily set up CVS or SVN; the diff is
based on the latest download available at wikimedia.org.

I'll check with Firefox in 'safe mode' to see if the problem is perhaps related
to an extension, but even if it is, I don't see any harm in explicitly stopping
the event.

Attached:

bugzilla wrote:

Starting Firefox in safe mode (all extensions and themes disabled) I am still
seeing this behaviour. The context menu appears and then persists during the
page load and must be dismissed before I can start editing. Tested at
wikimedia.org and mediawiki.org.