From 55e4ca9b6faaafc13cbc77e6f084f45143a18073 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 12 Dec 2016 08:25:45 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/customize-preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/customize-preview.js b/src/wp-includes/js/customize-preview.js index 026706e314..f51c45ff98 100644 --- a/src/wp-includes/js/customize-preview.js +++ b/src/wp-includes/js/customize-preview.js @@ -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' ) ) ) {