Skip to content

Commit

Permalink
Revert "[lexical-plaintext] Feature: add escape key handler" (#6185)
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleT authored May 28, 2024
1 parent 14a9388 commit 0607752
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/lexical-plain-text/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
KEY_BACKSPACE_COMMAND,
KEY_DELETE_COMMAND,
KEY_ENTER_COMMAND,
KEY_ESCAPE_COMMAND,
PASTE_COMMAND,
REMOVE_TEXT_COMMAND,
SELECT_ALL_COMMAND,
Expand Down Expand Up @@ -325,18 +324,6 @@ export function registerPlainText(editor: LexicalEditor): () => void {
},
COMMAND_PRIORITY_EDITOR,
),
editor.registerCommand(
KEY_ESCAPE_COMMAND,
() => {
const selection = $getSelection();
if (!$isRangeSelection(selection)) {
return false;
}
editor.blur();
return true;
},
COMMAND_PRIORITY_EDITOR,
),
editor.registerCommand(
SELECT_ALL_COMMAND,
() => {
Expand Down

0 comments on commit 0607752

Please sign in to comment.