diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 80c9ba0980..34db507584 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -1072,7 +1072,7 @@ function print_embed_scripts() { */ ?> /*! This file is auto-generated */ - !function(u,c){"use strict";var r,t,e,i=c.querySelector&&u.addEventListener,b=!1;function f(e,t){u.parent.postMessage({message:e,value:t,secret:r},"*")}function n(){if(!b){b=!0;var e,t=c.querySelector(".wp-embed-share-dialog"),r=c.querySelector(".wp-embed-share-dialog-open"),i=c.querySelector(".wp-embed-share-dialog-close"),n=c.querySelectorAll(".wp-embed-share-input"),a=c.querySelectorAll(".wp-embed-share-tab-button button"),o=c.querySelector(".wp-embed-featured-image img");if(n)for(e=0;e diff --git a/wp-includes/js/wp-embed-template.js b/wp-includes/js/wp-embed-template.js index 65b3a1b22f..86fb7d2c84 100644 --- a/wp-includes/js/wp-embed-template.js +++ b/wp-includes/js/wp-embed-template.js @@ -137,9 +137,7 @@ return; } - /** - * Send this document's height to the parent (embedding) site. - */ + // Send this document's height to the parent (embedding) site. sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) ); // Send the document's height again after the featured image has been loaded. @@ -161,9 +159,12 @@ href = target.parentElement.getAttribute( 'href' ); } - /** - * Send link target to the parent (embedding) site. - */ + // Only catch clicks from the primary mouse button, without any modifiers. + if ( event.altKey || event.ctrlKey || event.metaKey || event.shiftKey ) { + return; + } + + // Send link target to the parent (embedding) site. if ( href ) { sendEmbedMessage( 'link', href ); e.preventDefault(); diff --git a/wp-includes/js/wp-embed-template.min.js b/wp-includes/js/wp-embed-template.min.js index 0ef41267a3..e9040a2794 100644 --- a/wp-includes/js/wp-embed-template.min.js +++ b/wp-includes/js/wp-embed-template.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(u,c){"use strict";var r,t,e,i=c.querySelector&&u.addEventListener,b=!1;function f(e,t){u.parent.postMessage({message:e,value:t,secret:r},"*")}function n(){if(!b){b=!0;var e,t=c.querySelector(".wp-embed-share-dialog"),r=c.querySelector(".wp-embed-share-dialog-open"),i=c.querySelector(".wp-embed-share-dialog-close"),n=c.querySelectorAll(".wp-embed-share-input"),a=c.querySelectorAll(".wp-embed-share-tab-button button"),o=c.querySelector(".wp-embed-featured-image img");if(n)for(e=0;e