Page MenuHomePhabricator

Always allow default behavior of space key for menu components with text inputs
Closed, ResolvedPublic

Description

Current logic sometimes passes the keydown to a handler that may expand the menu or select a menu item if one is highlighted. However, this can be tricky to get right and recently caused a bug (T324397).

We decided to remove special handling of the space key for any menu component that has a text input, to ensure that a space keypress always results in a space character in the text input. This was done for Lookup as part of the fix for T324397, and needs to be done for TypeaheadSearch and Combobox.


Acceptance criteria

  • Logic is updated for TypeaheadSearch
  • Logic is updated for Combobox
  • Change demos on Menu page to reflect this new behavior

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 866642 had a related patch set uploaded (by Dani DW; author: Dani DW):

[design/codex@main] Combobox, TypeaheadSearch

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

Change 866642 merged by jenkins-bot:

[design/codex@main] Combobox, TypeaheadSearch: Always allow default behavior of space key for menu components with text inputs.

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

AnneT changed the task status from Open to In Progress.Dec 12 2022, 7:25 PM
AnneT updated the task description. (Show Details)

Change 867727 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v0.4.0 to v0.4.1

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/cb9ffaffec/w

Change 867727 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.4.0 to v0.4.2

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

Test wiki on Patch demo by ATomasevich (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/cb9ffaffec/w/

AnneT added a subscriber: EUdoh-WMF.

Assigning back to myself to rethink the demos on the Menu page, which use a text input that doesn't yet reflect this new behavior.

Change 883663 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] docs: Align Menu demos with keyboard navigation standards

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

Change 883663 merged by jenkins-bot:

[design/codex@main] docs: Align Menu demos with keyboard navigation standards

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

AnneT updated the task description. (Show Details)

The Menu demos have been updated to match the desired behavior (the space key always inserts a space character, rather than toggling the menu), so this is ready for final QTE signoff

Change 869852 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] Update Codex from v0.4.3 to v0.5.0

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

Change 885450 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] Update Codex from v0.4.3 to v0.5.0

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

Change 885450 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.4.3 to v0.5.0

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

egardner subscribed.

Closing this task since this work has now been released (in Codex 0.5).