Bug 1953179 - Fix enter key handling on toolbarbuttons in tab group menu. r=dwalker,tabbrowser-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D245220
This commit is contained in:
Dão Gottwald
2025-04-13 10:34:15 +00:00
parent f2ea56be57
commit a07bd270a0
2 changed files with 12 additions and 2 deletions

View File

@@ -886,7 +886,11 @@
this.close(false);
break;
case KeyEvent.DOM_VK_RETURN:
this.close();
// When focus is on a toolbarbutton, we need to wait for the command
// event, which will ultimately close the panel as well.
if (event.target.nodeName != "toolbarbutton") {
this.close();
}
break;
}
}