Remove infuriating behaviour of drawer closing on escape keypress
This commit is contained in:
parent
c6e4325afc
commit
689f3c9647
|
@ -21,16 +21,8 @@
|
||||||
}
|
}
|
||||||
visible = false
|
visible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleKey(e) {
|
|
||||||
if (visible && e.key === "Escape") {
|
|
||||||
hide()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:window on:keydown={handleKey} />
|
|
||||||
|
|
||||||
{#if visible}
|
{#if visible}
|
||||||
<Portal>
|
<Portal>
|
||||||
<section class:fillWidth class="drawer" transition:slide>
|
<section class:fillWidth class="drawer" transition:slide>
|
||||||
|
|
Loading…
Reference in New Issue