Skip to content

Commit

Permalink
fix(editor): properly dispose of temp new focus data
Browse files Browse the repository at this point in the history
  • Loading branch information
thesophiaxu committed Jan 15, 2022
1 parent e5d5d30 commit 556fbff
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,10 @@ export function DetailedNoteBlock({ data, isChildren, callbacks, options, isColl
const focusedState = window.unigraph.getState('global/focused').value;
const el = textInput.current?.firstChild || textInput.current;
if (focusedState.tail) tail = el.textContent.length;
if (focusedState.newData) el.textContent = focusedState.newData;
if (focusedState.newData) {
el.textContent = focusedState.newData;
delete focusedState.newData;
}
setCaret(document, el, tail || focusedState.caret);
}, 0);
}
Expand Down

0 comments on commit 556fbff

Please sign in to comment.