regression: focus changing issue with the peek overview editor (#4700)

This commit is contained in:
M. Palanikannan 2024-06-05 12:41:56 +05:30 committed by GitHub
parent 4d17616670
commit 8c5f693214
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,7 +112,7 @@ export const useEditor = ({
if (value === null || value === undefined) return; if (value === null || value === undefined) return;
if (editor && !editor.isDestroyed && !editor.storage.image.uploadInProgress) { if (editor && !editor.isDestroyed && !editor.storage.image.uploadInProgress) {
try { try {
editor.commands.setContent(value); editor.commands.setContent(value, false, { preserveWhitespace: "full" });
const currentSavedSelection = savedSelectionRef.current; const currentSavedSelection = savedSelectionRef.current;
if (currentSavedSelection) { if (currentSavedSelection) {
const docLength = editor.state.doc.content.size; const docLength = editor.state.doc.content.size;