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