From a72459a5f5a3ad118e7fea4277ac077c7d74a3be Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Fri, 9 Nov 2012 11:30:40 +0000 Subject: [PATCH] Media JS: Only block button events by default if the button does not link to anything. see #21390. git-svn-id: https://develop.svn.wordpress.org/trunk@22501 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/media-views.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index 744b81b411..9a6aca9c3d 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -1625,7 +1625,9 @@ }, click: function( event ) { - event.preventDefault(); + if ( '#' === this.attributes.href ) + event.preventDefault(); + if ( this.options.click && ! this.model.get('disabled') ) this.options.click.apply( this, arguments ); }