Skip to content

Commit

Permalink
Defer to preceding handlers in command palette keyboard shortcut (#53001
Browse files Browse the repository at this point in the history
)
  • Loading branch information
stokesman authored and tellthemachines committed Aug 1, 2023
1 parent 9a04e31 commit 86b95ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/commands/src/components/command-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ export function CommandMenu() {

useShortcut(
'core/commands',
/** @type {import('react').KeyboardEventHandler} */
( event ) => {
// Bails to avoid obscuring the effect of the preceding handler(s).
if ( event.defaultPrevented ) return;

event.preventDefault();
if ( isOpen ) {
close();
Expand Down

0 comments on commit 86b95ec

Please sign in to comment.