Page MenuHomePhabricator

PendingTextInputWidget should be hidden if JavaScript is disabled in HTMLForm
Closed, ResolvedPublic

Description

PendingTextInputWidget is used by TagMultiselectWidget and its children to display a widget in the loading state before the widget can be infused in JavaScript. However, if JavaScript is disabled or fails to load, the pending widget remains there, see screenshot:

image.png (626×1 px, 31 KB)

The textarea is meant to be used as the input element if JS is not available, hence I believe the pending element should simply be hidden if JavaScript is not available (client-nojs).

(This task would need a mediawiki-widgets tag that doesn't exist. I hope HTMLForm and OOUI are close enough to let potentially interested people see this task)

Event Timeline

Can you give the use case? I saw the one in Special:Preferences works fine with styles from mw.widgets.TagMultiselectWidget.base.css

Can you give the use case? I saw the one in Special:Preferences works fine with styles from mw.widgets.TagMultiselectWidget.base.css

Oh, you're right. I observed this behaviour on Special:EnableEventRegistration (CampaignEvents), which uses HTMLForm to generate the form (the patch that adds a UserMultiselectWidget is still in review though). In fact, the actual issue is that HTMLForm is not automatically loading the styles for the input.

Daimona renamed this task from PendingTextInputWidget should be hidden if JavaScript is disabled to PendingTextInputWidget should be hidden if JavaScript is disabled in HTMLForm.Feb 18 2023, 12:58 PM
Daimona removed a project: OOUI.

Change 890158 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/core@master] Load TagMultiselectWidget styles in the HTMLForm fields that need them

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

Change 890158 merged by jenkins-bot:

[mediawiki/core@master] Load TagMultiselectWidget styles in the HTMLForm fields that need them

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

Change 890348 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] htmlform: Load TagMultiselectWidget styles in more form fields

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

Change 890348 merged by jenkins-bot:

[mediawiki/core@master] htmlform: Load TagMultiselectWidget styles in more form fields

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