X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FTinyMCE%2Fjs%2Fthemes%2Fadvanced%2Fjs%2Fsource_editor.js;h=84546ad52ebc461ccdebb02e1762e8c9ea760744;hb=d67b8fdae83d948bf997a7f7cdbb71b52d9481e9;hp=279328614c5ee8a0077295a0ff7814a24d723922;hpb=6832a34216437cbacdc1e21f2cf8fa8f4e58ff63;p=quix0rs-gnu-social.git diff --git a/plugins/TinyMCE/js/themes/advanced/js/source_editor.js b/plugins/TinyMCE/js/themes/advanced/js/source_editor.js index 279328614c..84546ad52e 100644 --- a/plugins/TinyMCE/js/themes/advanced/js/source_editor.js +++ b/plugins/TinyMCE/js/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'; + } }