Page MenuHomePhabricator

ajaxwatch.js applies ID to wrong element, only processes one; tooltip doesn't update
Closed, ResolvedPublic

Description

Author: MediaWiki

Description:
diff -u result of comparing the latest MediaWiki version with my working copy of ajaxwatch.js

When the function wgAjaxWatch.setLinkID() is called, it sets the ID passed to it on the <a> instead of the containing <li>. What happens, for example on a page that was initially unwatched, is that <li id="ca-watch"><a> turns into <li id="ca-watch"><a id="ca-unwatch"> when the user clicks the tab to watch the page. I've attached a diff that applies the ID to the <li> instead, and loops through all the links in the wgAjaxWatch.watchLinks array to change their IDs (note: I've only tested on Monobook).

I hoped to fix the tooltip update problem by fixing the ID assignment glitch, but it hasn't worked. For that part of the bug, I have no patch.

Hopefully this trivial change will be committed by someone, then the tooltip problem can be worked on.


Version: 1.11.x
Severity: trivial

attachment ajaxwatch.js.diff ignored as obsolete

Details

Reference
bz12513

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:01 PM
bzimport set Reference to bz12513.

MediaWiki wrote:

Ecch, scratch that patch; it breaks cologneblue and classic, at the very least. Back to the drawing board...

MediaWiki wrote:

Updated diff to not cause issues with cologneblue et al

This one shouldn't cause problems in cologneblue or classic (tested and no problems for me). Still no ideas on the tooltip thing, though.

Attached:

Another AJAX/UI coding tweak for the UI team to check out the status on... :)

Note some of the old classic skins include two watch links, I believe (sidebar and top bar, or top and bottom, or some such thing)

Both fixed by Krinkle in /phase3/resources/mediawiki.action/mediawiki.action.watch.ajax.js