mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-11 04:38:18 +00:00
Fix combobox Escape handling inside dialogs (#204)
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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
@@ -390,7 +390,11 @@
|
||||
}
|
||||
|
||||
if (event.key === 'Escape') {
|
||||
root.close(true);
|
||||
if (isOpen) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
root.close(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user