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); + }} +/> + -