Skip to content

Commit

Permalink
Fix getSelectedNode logic for forward selection (facebook#3609)
Browse files Browse the repository at this point in the history
  • Loading branch information
moy2010 authored Dec 22, 2022
1 parent aa3f1e4 commit e0376ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lexical-playground/src/utils/getSelectedNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ export function getSelectedNode(
if (isBackward) {
return $isAtNodeEnd(focus) ? anchorNode : focusNode;
} else {
return $isAtNodeEnd(anchor) ? focusNode : anchorNode;
return $isAtNodeEnd(anchor) ? anchorNode : focusNode;
}
}

0 comments on commit e0376ea

Please sign in to comment.