Last modified: 2011-05-02 20:18:49 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11136, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9136 - Right-click handler for section editing doesn't suppress context menu in all browsers
Right-click handler for section editing doesn't suppress context menu in all ...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.10.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-28 22:05 UTC by Michael Newton
Modified: 2011-05-02 20:18 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
wikibits.js diff file (447 bytes, text/plain)
2007-03-06 18:38 UTC, Michael Newton
Details

Description Michael Newton 2007-02-28 22:05:55 UTC
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;
}
Comment 1 Antoine "hashar" Musso (WMF) 2007-03-01 18:59:34 UTC
Can you post a patch instead please ? 

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

then send us the me.patch file :)
Comment 2 Brion Vibber 2007-03-06 15:24:26 UTC
I can't reproduce this on Firefox 2.0.0.2 on Mac OS X or Windows XP.
Comment 3 Michael Newton 2007-03-06 18:38:59 UTC
Created attachment 3302 [details]
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.
Comment 4 Michael Newton 2007-03-06 18:51:53 UTC
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.
Comment 5 DieBuche 2011-05-02 20:18:49 UTC
Fixed with jQuery rewrite

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links