From a2a11c3bd26a276dee137109b3f7f01dc0414be5 Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Fri, 28 Oct 2022 15:29:17 +0200 Subject: [PATCH] Close modal using escape --- gui/dashboard/modal.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/dashboard/modal.svelte b/gui/dashboard/modal.svelte index d30339e..c2c5fe2 100644 --- a/gui/dashboard/modal.svelte +++ b/gui/dashboard/modal.svelte @@ -7,8 +7,16 @@ function close() { open = false; } + + function keyup(event) { + if (event.key === 'Escape') { + close(); + } + } + +