From a0c600a121473d9a89d9c9a315e21371b03ffae4 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 7 Dec 2014 20:10:56 +0000 Subject: [PATCH] When using the spacebar to select something in "bulk select" mode, don't scroll the page. Props avryl. Fixes #30622. git-svn-id: https://develop.svn.wordpress.org/trunk@30777 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-views.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 8465281496..c5de8f2c45 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -5243,14 +5243,13 @@ return; } + event.preventDefault(); + // In the grid view, bubble up an edit:attachment event to the controller. if ( this.controller.isModeActive( 'grid' ) ) { if ( this.controller.isModeActive( 'edit' ) ) { // Pass the current target to restore focus when closing this.controller.trigger( 'edit:attachment', this.model, event.currentTarget ); - - // Don't scroll the view and don't attempt to submit anything. - event.stopPropagation(); return; } @@ -5270,9 +5269,6 @@ }); this.controller.trigger( 'selection:toggle' ); - - // Don't scroll the view and don't attempt to submit anything. - event.stopPropagation(); }, /** * @param {Object} options