Page MenuHomePhabricator

DateInputWidget unusable when JavaScript is disabled
Closed, ResolvedPublic

Description

If you disable JavaScript, DateInputWidget should fall back to being a regular date input field and let the user type in the date. Currently, however, the field becomes completely unusable due to the CSS:

.mw-widget-dateInputWidget.oo-ui-textInputWidget input {
 -webkit-user-select: none;
 -moz-user-select: none;
 -ms-user-select: none;
 user-select: none;
}

See src/mediawiki.widgets/mw.widgets.DateInputWidget.less line 14.
This CSS should be applied by the OOjs-UI JavaScript, not in the LESS file (or overridden by a .client-nojs rule).

Event Timeline

Change 356066 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] mw.widgets.DateInputWidget: Remove accidental 'user-select' on PHP widget's input

https://gerrit.wikimedia.org/r/356066

Note that this seems to only affect Firefox. Chrome has support for <input type=date> and apparently ignores user-select: none; on those elements.

Change 356066 merged by VolkerE:
[mediawiki/core@master] mw.widgets.DateInputWidget: Remove accidental 'user-select' on PHP widget's input

https://gerrit.wikimedia.org/r/356066

Volker_E assigned this task to matmarex.
Volker_E triaged this task as Medium priority.
Volker_E removed a project: Patch-For-Review.
Jdforrester-WMF subscribed.

Mass-moving all items tagged for MediaWiki 1.30.0-wmf.3, as that was never released; instead, we're using -wmf.4.