Page MenuHomePhabricator

MenuButton: Pressing Enter when a menu item is highlighted should select that item
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Click on a MenuButton to open its menu
  • Use the arrow keys to highlight one of the items
  • Press Enter

What happens?: the menu closes, but the item that was highlighted is not selected

What should have happened instead?: the menu should close, and the item that was highlighted should be selected.

Prior to https://gerrit.wikimedia.org/r/c/design/codex/+/1169798, the selection behavior did work, but the menu would close and then immediately reopen, because of an interaction between the Menu's handling of the Enter key and the ToggleButton's handling of the Enter key. We chose to fix the menu not closing by temporarily breaking the selection behavior, but we should really fix both.

We might be able to do this by changing the ToggleButton to a regular Button (although that would change the design in other ways), or by somehow preventing the ToggleButton from reopening the menu after the Menu has already closed itself.

Event Timeline

Catrope triaged this task as High priority.Jul 17 2025, 9:32 PM
Catrope moved this task from Backlog to Upcoming on the Codex board.

Change #1217314 had a related patch set uploaded (by LWatson; author: LWatson):

[design/codex@main] MenuButton: replace internal toggle button with button

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

Change #1217314 merged by jenkins-bot:

[design/codex@main] MenuButton: replace internal toggle button with button

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

Change #1235058 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update Codex from v2.3.3 to v2.3.4

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

lwatson moved this task from Ready for Design/Dev to Pending Release on the Codex board.

Updating the status of this ticket. The commit closed 3 tickets (I missed this one)

Change #1235058 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v2.3.3 to v2.3.4

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