Page MenuHomePhabricator

MenuSelectWidget lost escape key support
Closed, ResolvedPublic

Description

With the latest change to v0.29.1 the MenuSelectWidget seems to have lost (parts of) its onKeyDown handling, the "escape" key does not close the suggestion menu as before.
This behavior can be reproduced on the demo page. Typing any value, e.g. "asd" in the ComboBoxInputWidget field (selects the first value), then hitting escape - this does not close the menu as observed in earlier versions (e.g. v0.28.2).

This can be reproduced in both latest Firefox and Chromium.

The defective code is not immediately obvious to me but was introduced during https://gerrit.wikimedia.org/r/c/oojs/ui/+/437960

Background: We first experienced this in a browser test for WikibaseLexeme on Special:NewLexeme when specifying a fallback lemma language (initially hidden), worked around it by not using escape any more.

Event Timeline

This goes beyond escape key on MenuSelectWidget. Could be that all of document keydown events are misbehaving for all widgets that are using SelectWidget in some way.

On Content Translation dashboard, there is no way to navigate through the list of results in "New translation" dialog. After noticing bug on CX dashboard, I went on to enwiki beta to edit some page using VE. There is no way to arrow through the list of results while searching for category to add.

Then, I went to check OOUI demo page for DropdownWidget. Opening the popup menu and pressing down arrow makes the code enter infinite loop and block the entire page. This can be reproduced on Special:AllPages.

Volker_E triaged this task as Unbreak Now! priority.Oct 8 2018, 6:37 AM

Seconding @Petar.petkovic's observation. Doesn't freeze the page on OS X/Chrome, but behaves very obscure.

Change 465189 had a related patch set uploaded (by Esanders; owner: Esanders):
[oojs/ui@master] Follow-up Ib00d6720: Fix key down listener name in MenuSelectWidget

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

Change 465189 merged by jenkins-bot:
[oojs/ui@master] Follow-up Ib00d6720: Fix KeyDown listener name in MenuSelectWidget

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

Volker_E edited projects, added OOUI (OOUI-0.29.2); removed OOUI.

Change 465297 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] Update OOUI to v0.29.2

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

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

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

Volker_E removed a project: Patch-For-Review.
Volker_E updated the task description. (Show Details)