Skip to content

Commit

Permalink
Defer to preceding handlers in command palette keyboard shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Jul 26, 2023
1 parent 06c704e commit 32e1e0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/commands/src/components/command-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ export function CommandMenu() {
useShortcut(
'core/commands',
( event ) => {
// Bails to avoid obscuring the effect of the preceding handler(s).
if ( event.isDefaultPrevented() ) return;

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

0 comments on commit 32e1e0d

Please sign in to comment.