mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 04:31:46 +02:00
fix: overlapping note contents when quickly switching
(fixes streetwriters/notesnook#561)
This commit is contained in:
@@ -278,7 +278,7 @@ function Editor({ noteId, nonce }) {
|
||||
sessionId={sessionId}
|
||||
onChange={(content, editor) => {
|
||||
const { id, sessionId } = editorstore.get().session;
|
||||
debouncedOnEditorChange(sessionId, id, sessionId, content);
|
||||
debouncedOnEditorChange(id, id, sessionId, content);
|
||||
debouncedUpdateWordCount(editor);
|
||||
}}
|
||||
changeInterval={100}
|
||||
|
||||
@@ -174,6 +174,8 @@ class EditorStore extends BaseStore {
|
||||
}
|
||||
|
||||
this.set((state) => {
|
||||
if (state.session.id !== note.id) return;
|
||||
|
||||
for (let key in session) {
|
||||
if (key === "content") continue;
|
||||
state.session[key] = session[key];
|
||||
|
||||
Reference in New Issue
Block a user