Skip to content

Commit

Permalink
Fix HTML editor not displaying properly when expanding field (#2792)
Browse files Browse the repository at this point in the history
  • Loading branch information
hikaru-y authored Oct 31, 2023
1 parent feaaaa2 commit 01d5a9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ts/editor/NoteEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ the AddCards dialog) should be implemented in the user of this component.
>
<PlainTextInput
{hidden}
fieldCollapsed={fieldsCollapsed[index]}
on:focusout={() => {
saveFieldNow();
$focusedInput = null;
Expand Down
3 changes: 2 additions & 1 deletion ts/editor/plain-text-input/PlainTextInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit 01d5a9a

Please sign in to comment.