mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
Close overflow menu on focusout
This commit is contained in:
parent
443f957027
commit
d02fb2bc78
1 changed files with 7 additions and 0 deletions
|
@ -191,6 +191,13 @@
|
|||
}
|
||||
}
|
||||
}}"
|
||||
on:focusout="{(e) => {
|
||||
if (open) {
|
||||
if (!buttonRef.contains(e.relatedTarget)) {
|
||||
open = false;
|
||||
}
|
||||
}
|
||||
}}"
|
||||
>
|
||||
<slot name="menu">
|
||||
<svelte:component
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue