diff --git a/packages/lexical/src/LexicalSelection.ts b/packages/lexical/src/LexicalSelection.ts index dd490b75be9..3af4b30d0db 100644 --- a/packages/lexical/src/LexicalSelection.ts +++ b/packages/lexical/src/LexicalSelection.ts @@ -1860,7 +1860,7 @@ export class RangeSelection implements BaseSelection { // extend the selection by one character in the specified direction. // This ensures that the parent element is deleted along with its content. // Otherwise, only the text content will be deleted, leaving an empty parent node. - if (this.anchor.offset === 0) { + if (this.isCollapsed() && this.anchor.offset === 0) { this.modify('extend', isBackward, 'character'); }