Skip to content

Commit

Permalink
Remove isCollapsed from selection onClick (#2727)
Browse files Browse the repository at this point in the history
Co-authored-by: John Flockton <johnflockton@Johns-MBP.cust.communityfibre.co.uk>
  • Loading branch information
thegreatercurve and John Flockton committed Nov 25, 2022
1 parent 49ebcb3 commit 3c9dcd7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/lexical/src/LexicalEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,7 @@ function onClick(event: MouseEvent, editor: LexicalEditor): void {
domSelection.removeAllRanges();
selection.dirty = true;
}
} else if (
domSelection &&
$isNodeSelection(selection) &&
domSelection.isCollapsed
) {
} else if (domSelection && $isNodeSelection(selection)) {
const domAnchor = domSelection.anchorNode;
// If the user is attempting to click selection back onto text, then
// we should attempt create a range selection.
Expand Down

0 comments on commit 3c9dcd7

Please sign in to comment.