From ee82c4f395a659eb36aa34ecd9e718894d5f094f Mon Sep 17 00:00:00 2001 From: matsuyama-k1 <111737064+matsuyama-k1@users.noreply.github.com> Date: Tue, 12 Dec 2023 23:25:38 +0900 Subject: [PATCH] =?UTF-8?q?Fixed:=20for=20#5162,=20The=20beginning=20of=20?= =?UTF-8?q?a=20TextNode=20with=20canInsertTextBefore=20false=20in=20?= =?UTF-8?q?=E2=80=A6=20(#5363)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/lexical/src/LexicalUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/lexical/src/LexicalUtils.ts b/packages/lexical/src/LexicalUtils.ts index d74873ba5f2..7d6972f0abf 100644 --- a/packages/lexical/src/LexicalUtils.ts +++ b/packages/lexical/src/LexicalUtils.ts @@ -650,7 +650,8 @@ export function $updateTextNodeFromDOMContent( prevSelection.anchor.offset === 0) || (prevSelection.anchor.key === textNode.__key && prevSelection.anchor.offset === 0 && - !node.canInsertTextBefore()) || + !node.canInsertTextBefore() && + !isComposing) || (prevSelection.focus.key === textNode.__key && prevSelection.focus.offset === prevTextContentSize && !node.canInsertTextAfter())))