mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-19 20:31:46 +02:00
Desktop, Mobile: Fixes #11317: Fix race condition which may cause data loss, particularly before or after pasting text in the note editor (#11334)
Co-authored-by: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com>
This commit is contained in:
parent
24d02c5fc3
commit
11b33474b7
@ -235,7 +235,6 @@ class NoteScreenComponent extends BaseScreenComponent<Props, State> implements B
|
||||
Keyboard.dismiss();
|
||||
|
||||
this.setState({
|
||||
note: { ...this.state.lastSavedNote },
|
||||
mode: 'view',
|
||||
});
|
||||
|
||||
|
@ -153,7 +153,7 @@ shared.saveNoteButton_press = async function(comp: BaseNoteScreenComponent, fold
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
const newState: any = {
|
||||
lastSavedNote: { ...note },
|
||||
lastSavedNote: { ...note, ...savedNote },
|
||||
note: note,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user