mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
fix(context-menu): close menu when clicking anywhere
This commit is contained in:
parent
7aafdb128e
commit
1f99115c34
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@
|
|||
}}"
|
||||
on:click="{(e) => {
|
||||
if (!open) return;
|
||||
if (e.target.contains(ref)) close();
|
||||
close();
|
||||
}}"
|
||||
on:keydown="{(e) => {
|
||||
if (open && e.key === 'Escape') close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue