mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
Close overflow menu on focusout (#475)
This commit is contained in:
parent
a2287658dd
commit
28349561ac
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">
|
<slot name="menu">
|
||||||
<svelte:component
|
<svelte:component
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue