Page MenuHomePhabricator

Right click to edit section causing browser hangs
Closed, ResolvedPublic

Description

Author: ryulong.wiki

Description:
As of the past couple of days, I've been experiencing an issue with the "right click to edit section" option in the preferences. Upon right clicking, the browser completely freezes up and it takes much longer to open up the editting window. Once the edit window loads, the browser is completely usable again. I've attempted this in FireFox and Chrome (Chrome had a shorter lag), and I've had the issue in FireFox in Safe Mode (no add ons at all active).


Version: unspecified
Severity: major

Details

Reference
bz39959

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:00 AM
bzimport set Reference to bz39959.

In the editing tab of Special:Preferences (https://en.wikipedia.org/wiki/Special:Preferences#mw-prefsection-editing), there's a user preference labeled "Enable section editing by right clicking on section titles (requires JavaScript)".

I think this user preference's JavaScript is the culprit of a few issues reported today regarding unresponsive script errors, maybe (cf. https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=510691366).

ryulong.wiki wrote:

I've just discovered that right clicking ANYTHING on Wikipedia is producing this error. It is taking way too long to open up the right click dialogue.

Created attachment 11064
screenshot of firebug

Seems like it's another issue in jquery 1.8.*

This time on FF 15, it is stuck in tokenize of Sizzle. Triggered initially by the selector:

"h1:has(.editsection a), h2:has(.editsection a), h3:has(.editsection a), h4:has(.editsection a), h5:has(.editsection a), h6:has(.editsection a)" of the right click editor.

Attached:

Screen_Shot_2012-09-04_at_13.32.51.png (212×904 px, 97 KB)

(In reply to comment #4)

Created attachment 11064 [details]
screenshot of firebug

Seems like it's another issue in jquery 1.8.*

This time on FF 15, it is stuck in tokenize of Sizzle. Triggered initially by
the selector:

"h1:has(.editsection a), h2:has(.editsection a), h3:has(.editsection a),
h4:has(.editsection a), h5:has(.editsection a), h6:has(.editsection a)" of the
right click editor.

Works fine in Chrome 21 and Firefox 15 here. Running MediaWiki in localhost, with jQuery 1.8.1 and right-click-edit-js enabled (commit right before t he revert).

Define "stuck" ?

Attached:

Screen_Shot_2012-09-04_at_13.32.51.png (212×904 px, 97 KB)

FF 15. "Warning: Unresponsive script. A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete."

It doesn't happen all the time, but quite often. It seems to loop somewhere in the selector parsing.

Fixed in I2fefb5376d0de40f4997a3a1763eee23fcd3e7fa

(by no longer using the :has() selector in a .live() handler, which were very two slow factors combined)