From 01d5a9a3d2dc21c98b9932daf60e6e81c8e911ce Mon Sep 17 00:00:00 2001 From: Hikaru Y Date: Wed, 1 Nov 2023 06:48:13 +0900 Subject: [PATCH] Fix HTML editor not displaying properly when expanding field (#2792) --- ts/editor/NoteEditor.svelte | 1 + ts/editor/plain-text-input/PlainTextInput.svelte | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/editor/NoteEditor.svelte b/ts/editor/NoteEditor.svelte index 54eb0a268..17ba6e437 100644 --- a/ts/editor/NoteEditor.svelte +++ b/ts/editor/NoteEditor.svelte @@ -736,6 +736,7 @@ 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 f0ea47515..612a78ffe 100644 --- a/ts/editor/plain-text-input/PlainTextInput.svelte +++ b/ts/editor/plain-text-input/PlainTextInput.svelte @@ -43,6 +43,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { storedToUndecorated, undecoratedToStored } from "./transform"; export let hidden = false; + export let fieldCollapsed = false; export const focusFlag = new Flag(); $: configuration = { @@ -116,7 +117,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html } $: { - pushUpdate(!hidden); + pushUpdate(!(hidden || fieldCollapsed)); tick().then(() => { refresh(); if (focusFlag.checkAndReset()) {