Close overflow menu on focusout (#475)

This commit is contained in:
Erik-Jan 2021-01-08 23:53:50 +01:00 committed by GitHub
commit 28349561ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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