Page MenuHomePhabricator

TagMultiselectWidget: the input field is editable even if the widget is disabled
Open, LowPublic

Description

Steps to reproduce:
Go to https://en.wikipedia.org/wiki/Special:AbuseFilter/323 (for tags) or https://en.wikipedia.org/wiki/Special:AbuseFilter/420 (for throttle) for example (with an account that does not have the rights to modify abuse filters)
In the field with "Add tags..." or "Split with commas...", add random text
Leave the text field

Actual result:
The random text is displayed as one of the throttle groups or tags, and when reloading the page there is a warning that your changes may not be saved, despite that the user cannot actually save the changes

Expected result:
The fields are hidden when the user cannot actually use them

Event Timeline

DannyS712 created this task.Aug 7 2019, 7:56 PM
Restricted Application added a project: User-DannyS712. · View Herald TranscriptAug 7 2019, 7:56 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Huji added a subscriber: Huji.Aug 7 2019, 8:26 PM

Interesting find!

We are using a MenuTagMultiselectWidget here, but somehow its "disabled" view in AbuseFilter differs from what you see in OOUI demos. If I were to guess, I would say we are not using the right method/property to mark it as disabled.

Huji assigned this task to Daimona.Aug 7 2019, 10:31 PM

Yep, I think so. Maybe there've been an update to the widget. Will check in a few days.

I see that AF is passing the correct value for disabled, that the above part of the widget is indeed greyed out, and the docs say that disabled is still an option for TagMultiselectWidget. But still, the input widget is writeable. Probably some bug/regression in OOUI itself.

DannyS712 triaged this task as Low priority.Aug 10 2019, 1:41 PM

Low priority - very unlikely to be encountered by accident, and does no harm for now

I'd leave it untriaged for OOUI people. This is not only impacting AF, but the entire OOUI library, which has a wider use. Sure, it's only a minor, visual glitch, but I can't if low is fine, without knowing what exactly is affected by this bug.

Daimona renamed this task from Editing filter: disable changing tags or throttle groups when user can't modify filters to TagMultiselectWidget: the input field is editable even if the widget is disabled.Aug 10 2019, 1:45 PM
DannyS712 raised the priority of this task from Low to Needs Triage.Aug 10 2019, 1:45 PM
Daimona removed Daimona as the assignee of this task.Sun, Sep 15, 11:57 AM
Daimona added a subscriber: Daimona.
Volker_E triaged this task as Low priority.Mon, Sep 16, 8:26 PM
Volker_E added a subscriber: Mooeypoo.