diff --git src/wp-includes/js/wp-embed-template.js src/wp-includes/js/wp-embed-template.js
index 2960991..16f6708 100644
|
|
|
|
| 26 | 26 | share_dialog_close = document.querySelector( '.wp-embed-share-dialog-close' ), |
| 27 | 27 | share_input = document.querySelectorAll( '.wp-embed-share-input' ), |
| 28 | 28 | share_dialog_tabs = document.querySelectorAll( '.wp-embed-share-tab-button button' ), |
| | 29 | featured_image = document.querySelector( '.wp-embed-featured-image img' ), |
| 29 | 30 | i; |
| 30 | 31 | |
| 31 | 32 | if ( share_input ) { |
| … |
… |
|
| 139 | 140 | sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) ); |
| 140 | 141 | |
| 141 | 142 | // Send the document's height again after the featured image has been loaded. |
| 142 | | document.querySelector( '.wp-embed-featured-image img' ).addEventListener( 'load', function() { |
| 143 | | sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) ); |
| 144 | | } ); |
| | 143 | if ( featured_image ) { |
| | 144 | featured_image.addEventListener( 'load', function() { |
| | 145 | sendEmbedMessage( 'height', Math.ceil( document.body.getBoundingClientRect().height ) ); |
| | 146 | } ); |
| | 147 | } |
| 145 | 148 | |
| 146 | 149 | /** |
| 147 | 150 | * Detect clicks to external (_top) links. |