From 56e1ee0b748c7ede2a49d7f42d78ac2de3ecea34 Mon Sep 17 00:00:00 2001 From: joyqi Date: Fri, 1 Nov 2013 20:54:47 +0800 Subject: [PATCH] fix height --- admin/editor-js.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/editor-js.php b/admin/editor-js.php index 037e5185..851f65e3 100644 --- a/admin/editor-js.php +++ b/admin/editor-js.php @@ -128,16 +128,16 @@ $(document).ready(function () { var input = $('#text'), th = textarea.height(); editor.hooks.chain('enterFakeFullScreen', function () { - var height = Math.max(document.documentElement.clientHeight, document.body.clientHeight); + var height = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight; th = textarea.height(); $(document.body).addClass('fullscreen'); - textarea.css('height', height - 52); + textarea.css('height', height - toolbar.outerHeight()); }); editor.hooks.chain('enterFullScreen', function () { $(document.body).addClass('fullscreen'); - textarea.css('height', window.screen.height - 52); + textarea.css('height', window.screen.height - toolbar.outerHeight()); }); editor.hooks.chain('exitFullScreen', function () {