Page MenuHomePhabricator

Enhanced recent changes clobbers classes
Closed, InvalidPublic

Description

Author: orangepickle12

Description:
patch detailed in description

Instead of adding/removing classes from elements, toggleVisiblity in enhancedchanges.js sets the full class attribute. This conflicts with any third-party scripts that might set their own classes (and it was in writing such a script that I came across this).

I've attached a patch for skins/common/enhancedchanges.js, which fixes this for the #mw-rc-subentries- elements - I think it unlikely you'd need to mess with the arrows' classes, but fixing them is as easy. Maybe it would also make sense to use similar RexEx to test for the arrow's class instead of "openarrow.className == 'mw-changeslist-expanded'"?


Version: 1.17.x
Severity: minor

Attached:

Details

Reference
bz25941

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:21 PM
bzimport set Reference to bz25941.
bzimport added a subscriber: Unknown Object (MLST).

This has been fixed already in december 2010.

A plugin was added to make an element collapsible ($.fn.makeCollapsible() - added in r78914), which solved several problems, such as these since it doesn't replace but adds/removes classes.

skins/common/enhancedchanges.js was removed in favour of using makeCollapsible() in r79083.

Closing as fixed. Depending on how much of the recent ResourceLoader development will be merged to REL1_17 and/or 1.17wmf, this may not be live untill 1.18.