X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=program%2Fjs%2Ftiny_mce%2Fthemes%2Fadvanced%2Fjs%2Fsource_editor.js;h=84546ad52ebc461ccdebb02e1762e8c9ea760744;hb=511160353722ebec8c258ddd6fa963ec8851eede;hp=279328614c5ee8a0077295a0ff7814a24d723922;hpb=b68022ca3782d5eb5a1a7ef6f8cf7abe1dc15bd6;p=roundcube.git diff --git a/program/js/tiny_mce/themes/advanced/js/source_editor.js b/program/js/tiny_mce/themes/advanced/js/source_editor.js index 2793286..84546ad 100644 --- a/program/js/tiny_mce/themes/advanced/js/source_editor.js +++ b/program/js/tiny_mce/themes/advanced/js/source_editor.js @@ -44,19 +44,13 @@ function toggleWordWrap(elm) { setWrap('off'); } -var wHeight=0, wWidth=0, owHeight=0, owWidth=0; - function resizeInputs() { - var el = document.getElementById('htmlSource'); + var vp = tinyMCEPopup.dom.getViewPort(window), el; - if (!tinymce.isIE) { - wHeight = self.innerHeight - 65; - wWidth = self.innerWidth - 16; - } else { - wHeight = document.body.clientHeight - 70; - wWidth = document.body.clientWidth - 16; - } + el = document.getElementById('htmlSource'); - el.style.height = Math.abs(wHeight) + 'px'; - el.style.width = Math.abs(wWidth) + 'px'; + if (el) { + el.style.width = (vp.w - 20) + 'px'; + el.style.height = (vp.h - 65) + 'px'; + } }