Skip to content

Commit

Permalink
Add missing comment to explain usage of open-only keyboard shortcut u…
Browse files Browse the repository at this point in the history
…sage.
  • Loading branch information
alexstine committed Jun 11, 2023
1 parent b4add25 commit 20f5008
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function KeyboardShortcutsEditMode() {
event.preventDefault();
} );

// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.
useShortcut( 'core/edit-site/toggle-list-view', () => {
if ( isListViewOpen ) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function KeyboardShortcuts() {
event.preventDefault();
} );

// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.
useShortcut( 'core/edit-site/toggle-list-view', () => {
if ( ! isListViewOpen ) {
return;
Expand Down

0 comments on commit 20f5008

Please sign in to comment.