fix: assign the original text to text editor only during init (#6580)

This commit is contained in:
Aakansha Doshi 2023-05-13 22:47:29 +05:30 committed by GitHub
parent 2c511e30cd
commit e0f2869374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,6 @@ export const textWysiwyg = ({
const initialSelectionStart = editable.selectionStart;
const initialSelectionEnd = editable.selectionEnd;
const initialLength = editable.value.length;
editable.value = updatedTextElement.originalText;
// restore cursor position after value updated so it doesn't
// go to the end of text when container auto expanded
@ -358,6 +357,7 @@ export const textWysiwyg = ({
overflowWrap: "break-word",
boxSizing: "content-box",
});
editable.value = element.originalText;
updateWysiwygStyle();
if (onChange) {