Skip to content

Commit 38d5dbd

Browse files
authored
[lexical] Bug Fix: update block cursor if selection has changed (#7947)
1 parent 9f6c7b3 commit 38d5dbd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/lexical/src/LexicalUpdates.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,10 @@ export function $commitPendingUpdates(
623623
editor._editable &&
624624
// domSelection will be null in headless
625625
domSelection !== null &&
626-
(needsUpdate || pendingSelection === null || pendingSelection.dirty) &&
626+
(needsUpdate ||
627+
pendingSelection === null ||
628+
pendingSelection.dirty ||
629+
!pendingSelection.is(currentSelection)) &&
627630
rootElement !== null &&
628631
!tags.has(SKIP_DOM_SELECTION_TAG)
629632
) {

0 commit comments

Comments
 (0)