mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
fixes #1024
This commit is contained in:
@@ -214,7 +214,8 @@ export default class SlDropdown extends ShoelaceElement {
|
||||
|
||||
handleTriggerKeyDown(event: KeyboardEvent) {
|
||||
// Close when escape or tab is pressed
|
||||
if (event.key === 'Escape') {
|
||||
if (event.key === 'Escape' && this.open) {
|
||||
event.stopPropagation();
|
||||
this.focusOnTrigger();
|
||||
this.hide();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user