Page MenuHomePhabricator

ComboBoxInputWidget.setValue shows warning if called before element attached
Closed, ResolvedPublicBUG REPORT

Description

From gerrit:

I run into this while working on Ie0334df (T260157). In VisualEditor, InputWidget.setValue() is called on construction time: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/VisualEditor/+/refs/heads/master/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js#49
These widgets are not disabled (they shouldn't), but not attached to anything yet. Still ComboBoxInputWidget.onInputChange() is triggered (this is intentional, as far as I can tell). This unconditionally calls MenuSelectWidget.toggle( true ). This prints a warning and causes the combobox widget to behave odd. The dropdown menu is open when the form opens, but is not properly sized.

Event Timeline

Change 621697 had a related patch set uploaded (by Esanders; owner: Thiemo Kreuz (WMDE)):
[oojs/ui@master] ComboBoxInputWidget: Only show menu on user triggered events

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

thiemowmde changed the subtype of this task from "Task" to "Bug Report".
thiemowmde moved this task from Sprint Backlog to Review on the WMDE-QWERTY-Sprint-2020-08-12 board.
thiemowmde moved this task from Sprint Backlog to Demo on the WMDE-QWERTY-Sprint-2020-08-26 board.

Change 621697 merged by jenkins-bot:
[oojs/ui@master] ComboBoxInputWidget: Only show menu on user triggered events

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

Change 623824 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/core@master] Update OOUI to v0.40.3

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

thiemowmde claimed this task.

Change 623824 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.40.3

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