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 Jul 31, 2023
1 parent 66d0606 commit 5d8bf4b
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 @@ -198,7 +198,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

1 comment on commit 5d8bf4b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 5d8bf4b.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5715146049
📝 Reported issues:

Please sign in to comment.