summaryrefslogtreecommitdiff
path: root/plugins/TinyMCE/js/plugins/fullscreen/editor_plugin_src.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TinyMCE/js/plugins/fullscreen/editor_plugin_src.js')
-rw-r--r--plugins/TinyMCE/js/plugins/fullscreen/editor_plugin_src.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/TinyMCE/js/plugins/fullscreen/editor_plugin_src.js b/plugins/TinyMCE/js/plugins/fullscreen/editor_plugin_src.js
index 7429fffc7..0efd9bbe5 100644
--- a/plugins/TinyMCE/js/plugins/fullscreen/editor_plugin_src.js
+++ b/plugins/TinyMCE/js/plugins/fullscreen/editor_plugin_src.js
@@ -110,16 +110,19 @@
});
t.fullscreenEditor.render();
- tinyMCE.add(t.fullscreenEditor);
t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
t.fullscreenElement.update();
//document.body.overflow = 'hidden';
t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
- var vp = tinymce.DOM.getViewPort();
+ var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
- t.fullscreenEditor.theme.resizeTo(vp.w, vp.h);
+ // Get outer/inner size to get a delta size that can be used to calc the new iframe size
+ outerSize = fed.dom.getSize(fed.getContainer().firstChild);
+ innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
+
+ fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
});
}
});