mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Embeds: Use a more accessible way to initially hide the iframe.
This fixes a bug in Firefox where assets inside the iframe aren't being displayed because they have no computed style. See #35894. git-svn-id: https://develop.svn.wordpress.org/trunk@36708 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -777,7 +777,7 @@ function wp_filter_oembed_result( $result, $data, $url ) {
|
||||
|
||||
if ( ! empty( $content[1] ) ) {
|
||||
// We have a blockquote to fall back on. Hide the iframe by default.
|
||||
$html = str_replace( '<iframe', '<iframe style="display:none;"', $html );
|
||||
$html = str_replace( '<iframe', '<iframe style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"', $html );
|
||||
$html = str_replace( '<blockquote', '<blockquote class="wp-embedded-content"', $html );
|
||||
}
|
||||
|
||||
@@ -953,7 +953,7 @@ function print_embed_scripts() {
|
||||
* @return string The filtered content.
|
||||
*/
|
||||
function _oembed_filter_feed_content( $content ) {
|
||||
return str_replace( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="display:none;"', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $content );
|
||||
return str_replace( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $content );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user