Fix combobox Escape handling inside dialogs (#204)

This commit is contained in:
Stefan Gründel
2026-10-23 09:51:21 +08:00
committed by GitHub
parent b7d33eee04
commit 64d219fdc6
3 changed files with 12 additions and 2 deletions
+5 -1
View File
@@ -1,6 +1,10 @@
# Changelog
## Unreleased
## [Unreleased]
### Fixed
- Prevented Escape from dismissing an enclosing dialog while closing an open Combobox popup.
## [1.0.2] - 2026-07-06
+2
View File
@@ -85,6 +85,8 @@ Combobox is input-first. The visible input filters the list; the hidden input st
</Step>
</Steps>
Pressing Escape in the input closes an open suggestions popup without dismissing an enclosing dialog. Once the popup is closed, press Escape again to dismiss the dialog.
### HTML structure
<dl>
+5 -1
View File
@@ -390,7 +390,11 @@
}
if (event.key === 'Escape') {
root.close(true);
if (isOpen) {
event.preventDefault();
event.stopPropagation();
root.close(true);
}
return;
}