Customize: Prevent navigation in preview when clicking on child elements of preview links that have non-previewable URLs.

Props westonruter.
Merges [39584] to the 4.7 branch.
Fixes #39098.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39585 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2016-12-12 08:25:45 +00:00
parent 46611f6153
commit 55e4ca9b6f

View File

@ -138,7 +138,7 @@
*/
handleLinkClick: function( event ) {
var preview = this, link, isInternalJumpLink;
link = $( event.target );
link = $( event.target ).closest( 'a' );
// No-op if the anchor is not a link.
if ( _.isUndefined( link.attr( 'href' ) ) ) {