Observed bug
Sometimes, on expanding the infobox on Special:Contributions, the data do not load. Sometimes, the user option saving whether the infobox is expanded or collapsed is incorrectly updated.
For more details, see T302285#7835425 and surrounding comments.
Reason for the bug
On clicking expand in the infobox, multiple click handlers run:
- From jquery.makeCollapsible, a handler runs that (among other things) toggles the mw-collapsed class
- From ext.ipInfo/infobox/init, a handler runs that checks the mw-collapsed class to see whether the infobox is expanded, and loads or does not load the data, accordingly
- A second handler from ext.ipInfo/infobox/init also checks the mw-collapsed class and updates the user option (or localStorage) accordingly
If (2) and/or (3) run before (1), they will make the wrong inference about whether the infobox is expanded.
Acceptance criteria
- The expand/collapse functionality of the infobox works as intended
Testing notes
I could reproduce the bug consistently by setting $wgShowDebug = true; in LocalSettings.php