]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/wp-embed-template.js
Wordpress 4.6
[autoinstalls/wordpress.git] / wp-includes / js / wp-embed-template.js
index 60ea47d3874ec6237a101a3e9dfa83c67d30f6a6..16f67080eacc794b4c327ed504917deefb73ab75 100644 (file)
@@ -26,6 +26,7 @@
                        share_dialog_close = document.querySelector( '.wp-embed-share-dialog-close' ),
                        share_input = document.querySelectorAll( '.wp-embed-share-input' ),
                        share_dialog_tabs = document.querySelectorAll( '.wp-embed-share-tab-button button' ),
+                       featured_image = document.querySelector( '.wp-embed-featured-image img' ),
                        i;
 
                if ( share_input ) {
                 */
                sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) );
 
+               // Send the document's height again after the featured image has been loaded.
+               if ( featured_image ) {
+                       featured_image.addEventListener( 'load', function() {
+                               sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) );
+                       } );
+               }
+
                /**
                 * Detect clicks to external (_top) links.
                 */