TinyMCE wpView: add sandbox iframe body styling to get proper height when resizing the iframe, fixes #29270.
git-svn-id: https://develop.svn.wordpress.org/trunk@29544 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d8fac44995
commit
3a6ab09a19
@ -157,13 +157,15 @@ window.wp = window.wp || {};
|
||||
'<head>' +
|
||||
'<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' +
|
||||
'<style>' +
|
||||
'html, body#wpview-iframe-sandbox {' +
|
||||
'html {' +
|
||||
'background: transparent;' +
|
||||
'padding: 0;' +
|
||||
'margin: 0;' +
|
||||
'}' +
|
||||
'body#wpview-iframe-sandbox {' +
|
||||
'background: transparent;' +
|
||||
'padding: 1px 0;' +
|
||||
'margin: -1px 0 0;' +
|
||||
'}' +
|
||||
'</style>' +
|
||||
'</head>' +
|
||||
@ -176,7 +178,7 @@ window.wp = window.wp || {};
|
||||
|
||||
resize = function() {
|
||||
// Make sure the iframe still exists.
|
||||
iframe.contentWindow && $( iframe ).height( $( iframeDoc.body ).outerHeight() );
|
||||
iframe.contentWindow && $( iframe ).height( $( iframeDoc.body ).height() );
|
||||
};
|
||||
|
||||
if ( MutationObserver ) {
|
||||
|
Loading…
Reference in New Issue
Block a user