TinyMCE wpView: add sandbox iframe body styling to get proper height when resizing the iframe, fixes #29270.

Built from https://develop.svn.wordpress.org/trunk@29544


git-svn-id: http://core.svn.wordpress.org/trunk@29320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-08-19 22:20:15 +00:00
parent afdb25bd56
commit 51b307bcd3
2 changed files with 5 additions and 3 deletions

View File

@ -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 ) {

File diff suppressed because one or more lines are too long