Page MenuHomePhabricator

Remove jquery.checkboxShiftClick from default payload
Open, Needs TriagePublic


The feature

On all page loads (regardless of wiki, user, skin or url), there is JavaScript looking for checkboxes. It listens to when they are clicked, and on successive clicks it checks if the Shift-key is being held. If it is, it will enable all checkboxes between the current and last-clicked checkbox.


This functionality has existed since 2008, introduced in MediaWiki 1.6 with r13173 (2afce2e3f58), as requested in T4115. The primary use case for it was the checkboxes on Special:Undelete. This still exist today:

Since then, the feature has been:

  • (2010) Ported to ResourceLoader as part of mw.util.init. (r75287 / c28ba5133).
  • (2010) Factored out into its own module, as dependency of mediawiki.util, called from mw.util.init. (r75546 / e2e6fb563b)
  • (2011) Decoupled from mw.util.init into a general module for initialisation code on page views. This made mediawik.util free of side-effects, per T28799. (r90605 / 95173d11f)

It is currently registered as its own module, but only ever used as part of Per the concerns outlined at T202154 and Page load, this does not make sense as its own module bundle.

It is currently loaded on all page views, but page views are by definition also the very context it can never be used on given wikitext cannot generally create forms (exception being Inputbox which wasn't designed to be affected by this afaik, and also doesn't produce many checkboxes). It is only needed on Special:Undelete and perhaps a handful of other forms (to be decide).

It currently applies to any checkbox anywhere on the page. This might trigger unexpectedly. It should instead be opt-in. For example, with a class name on a containing element (form, fieldset, etc).

Some questions:

  • Where does it currently apply?
  • Where do we want this to apply?

Some ideas:

  • Make it part of mediawiki.htmlform (similar to autoinfuse and other misc form utilities)
  • Remove as generic snippet, and inline it where needed , e.g. for Special:Undelete as part of mediawiki.special.undelete.
  • Provide it as OOUI feature and offer only on OOUI-powered pages.
  • Remove the feature entirely?

Event Timeline

Krinkle created this task.Wed, Sep 11, 10:46 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptWed, Sep 11, 10:46 PM

Here's a perhaps surprising place to see it in action:


Restricted Application added a subscriber: MGChecker. · View Herald TranscriptWed, Sep 11, 10:50 PM

Here's a perhaps surprising place to see it in action:


Wow. Yeah, that's a serious anti-feature.

Change 536543 had a related patch set uploaded (by Krinkle; owner: Fomafix):
[mediawiki/core@master] Integrate module 'jquery.checkboxShiftClick' into ''

Change 536543 merged by jenkins-bot:
[mediawiki/core@master] Integrate module 'jquery.checkboxShiftClick' into ''