Skip to content

Commit

Permalink
Prevent shift+click on expand toggle from opening a new window
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewserong committed Feb 16, 2022
1 parent b321851 commit db31ffd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-editor/src/components/list-view/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ function ListViewBlock( {

const toggleExpanded = useCallback(
( event ) => {
// Prevent shift+click from opening link in a new window when toggling.
event.preventDefault();
event.stopPropagation();
if ( isExpanded === true ) {
collapse( clientId );
Expand Down

0 comments on commit db31ffd

Please sign in to comment.