Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HTML editor not displaying properly when expanding field #2792

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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