Skip to content

Commit ee8bf35

Browse files
committed
[lexical] Bug Fix: Ignore input event from inside decorators
1 parent 934e3c3 commit ee8bf35

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/lexical/src/LexicalEvents.ts

+7
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,13 @@ function onInput(event: InputEvent, editor: LexicalEditor): void {
895895
updateEditorSync(
896896
editor,
897897
() => {
898+
if (
899+
isHTMLElement(event.target) &&
900+
$isSelectionCapturedInDecorator(event.target)
901+
) {
902+
return;
903+
}
904+
898905
const selection = $getSelection();
899906
const data = event.data;
900907
const targetRange = getTargetRange(event);

0 commit comments

Comments
 (0)