Skip to content

Commit

Permalink
Fire selection change on decorator delete (#4555)
Browse files Browse the repository at this point in the history
  • Loading branch information
acywatson authored May 26, 2023
1 parent 5cfb7fa commit 7d6c0d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/lexical/src/LexicalSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
DEPRECATED_GridCellNode,
DEPRECATED_GridNode,
DEPRECATED_GridRowNode,
SELECTION_CHANGE_COMMAND,
TextNode,
} from '.';
import {DOM_ELEMENT_TYPE, TEXT_TYPE_TO_FORMAT} from './LexicalConstants';
Expand Down Expand Up @@ -2080,6 +2081,8 @@ export class RangeSelection implements BaseSelection {
$setSelection(nodeSelection);
} else {
possibleNode.remove();
const editor = getActiveEditor();
editor.dispatchCommand(SELECTION_CHANGE_COMMAND, undefined);
}
return;
} else if (
Expand Down

2 comments on commit 7d6c0d6

@vercel
Copy link

@vercel vercel bot commented on 7d6c0d6 May 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lexical – ./packages/lexical-website

lexical-git-main-fbopensource.vercel.app
lexical.dev
lexical-fbopensource.vercel.app
lexicaljs.org
lexicaljs.com
www.lexical.dev

@vercel
Copy link

@vercel vercel bot commented on 7d6c0d6 May 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lexical-playground – ./packages/lexical-playground

lexical-playground.vercel.app
lexical-playground-fbopensource.vercel.app
lexical-playground-git-main-fbopensource.vercel.app
playground.lexical.dev

Please sign in to comment.