Skip to content

Commit

Permalink
Prevent the list view shortcut from typing unexpected characters (#54078
Browse files Browse the repository at this point in the history
)
  • Loading branch information
youknowriad authored Aug 31, 2023
1 parent 4df5573 commit 3c27042
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ function KeyboardShortcuts() {
} );

// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.
useShortcut( 'core/edit-post/toggle-list-view', () => {
useShortcut( 'core/edit-post/toggle-list-view', ( event ) => {
if ( ! isListViewOpened() ) {
event.preventDefault();
setIsListViewOpened( true );
}
} );
Expand Down

0 comments on commit 3c27042

Please sign in to comment.