mirror of
https://github.com/ankitects/anki.git
synced 2026-01-07 02:53:54 -05:00
Added: Blur event for menu
This commit is contained in:
parent
f6dd6c9b81
commit
24424af95d
1 changed files with 3 additions and 1 deletions
|
|
@ -14,9 +14,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
}
|
||||
|
||||
onMount(() => {
|
||||
document.addEventListener("closemenu", () => close());
|
||||
document.addEventListener("closemenu", close);
|
||||
window.addEventListener("blur", close);
|
||||
return () => {
|
||||
document.removeEventListener("closemenu", close);
|
||||
window.removeEventListener("blur", close);
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue