From 9597e0a2502bb5c050a2121119e42902413a8cef Mon Sep 17 00:00:00 2001 From: Bhasher Date: Fri, 12 Jan 2024 00:29:17 +0100 Subject: [PATCH] Fix modalcard key issue --- .../src/lib/components/card/ModalCard.svelte | 16 +++++++++++----- .../src/lib/components/project/Column.svelte | 16 +++++++++------- .../src/lib/components/tags/ModalTagValue.svelte | 3 ++- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/frontend/src/lib/components/card/ModalCard.svelte b/frontend/src/lib/components/card/ModalCard.svelte index 1a450dd..01bf79f 100644 --- a/frontend/src/lib/components/card/ModalCard.svelte +++ b/frontend/src/lib/components/card/ModalCard.svelte @@ -8,8 +8,8 @@ export let card: Card; export let showModal: boolean; - let newTitle = card.title; - let newContent = card.content; + let newTitle: string = card.title; + let newContent: string = card.content; async function save(closeModal: boolean = true) { if (card.title !== newTitle || card.content !== newContent) { @@ -21,22 +21,28 @@ } + { + if (e.key === 'Escape') return save(true); + }} +/> + -