Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Sep 24, 2024
1 parent f266434 commit 2e5a59a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/selection/src/react/onKeyDownSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const onKeyDownSelection: KeyboardHandler<BlockSelectionConfig> = ({
event,
}) => {
if (isHotkey('mod+a', event)) {
if (event.defaultPrevented) return;

const ancestorNode = getAncestorNode(editor);

if (!ancestorNode) return;
Expand All @@ -36,6 +38,8 @@ export const onKeyDownSelection: KeyboardHandler<BlockSelectionConfig> = ({
event.stopPropagation();
}
if (isHotkey('escape', event)) {
if (event.defaultPrevented) return;

const ancestorNode = getAncestorNode(editor);
const id = ancestorNode?.[0].id;

Expand Down

0 comments on commit 2e5a59a

Please sign in to comment.