From 52722065ea199fa57ae750fa34bf47ee1c5aab3c Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Wed, 14 Sep 2022 01:52:16 +0200 Subject: [PATCH] Make Collapsible unmount the component --- ts/components/Collapsible.svelte | 8 ++-- ts/editor/NoteEditor.svelte | 12 +----- .../plain-text-input/PlainTextInput.svelte | 43 +++---------------- 3 files changed, 14 insertions(+), 49 deletions(-) diff --git a/ts/components/Collapsible.svelte b/ts/components/Collapsible.svelte index 3fe987267..bcb2ca243 100644 --- a/ts/components/Collapsible.svelte +++ b/ts/components/Collapsible.svelte @@ -50,6 +50,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } -
- -
+{#if !collapsed} +
+ +
+{/if} diff --git a/ts/editor/NoteEditor.svelte b/ts/editor/NoteEditor.svelte index bc189d617..3ceafea7a 100644 --- a/ts/editor/NoteEditor.svelte +++ b/ts/editor/NoteEditor.svelte @@ -435,12 +435,8 @@ the AddCards dialog) should be implemented in the user of this component. - + { saveFieldNow(); $focusedInput = null; @@ -454,12 +450,8 @@ the AddCards dialog) should be implemented in the user of this component. - + { saveFieldNow(); $focusedInput = null; diff --git a/ts/editor/plain-text-input/PlainTextInput.svelte b/ts/editor/plain-text-input/PlainTextInput.svelte index e849958d7..8f9632a6d 100644 --- a/ts/editor/plain-text-input/PlainTextInput.svelte +++ b/ts/editor/plain-text-input/PlainTextInput.svelte @@ -27,7 +27,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html