diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index 036b108cb..2fdc38526 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -289,7 +289,6 @@ function onSelectAllAttachments() { function onWindowResize(event) { var textarea = document.pageform.text; - var windowheight = (typeof self.innerHeight == "number" ? self.innerHeight : document.body.clientHeight); var rowheight = (Element.getHeight(textarea) / textarea.rows); var headerarea = $("headerArea"); @@ -299,30 +298,31 @@ function onWindowResize(event) { var textareaoffset = textarea.offsetTop; // Resize the textarea (message content) - textarea.rows = Math.round((windowheight - textareaoffset) / rowheight); + textarea.rows = Math.round((window.height() - textareaoffset) / rowheight); var attachmentsarea = $("attachmentsArea"); var attachmentswidth = 0; if (attachmentsarea.style.display) attachmentswidth = attachmentsarea.getWidth(); - var subjectfield = $(document).getElementsByClassName('headerField', $('subjectRow'))[0]; - var subjectinput = $(document).getElementsByClassName('textField', $('subjectRow'))[0]; + var subjectfield = $(document).getElementsByClassName('headerField', + $('subjectRow'))[0]; + var subjectinput = $(document).getElementsByClassName('textField', + $('subjectRow'))[0]; // Resize subject field subjectinput.setStyle({ width: (window.width() - $(subjectfield).getWidth() - attachmentswidth - - 4 - 30 - ) + 'px' }); + - 4 - 30) + 'px' }); // Resize address fields var addresslist = $('addressList'); var firstselect = document.getElementsByClassName('headerField', addresslist)[0]; - var inputwidth = $(this).width - $(firstselect).getWidth() - attachmentswidth - 24 - 30; + var inputwidth = ($(this).width() - $(firstselect).getWidth() + - attachmentswidth - 24 - 30); var addresses = document.getElementsByClassName('textField', addresslist); - for (var i = 0; i < addresses.length; i++) { + for (var i = 0; i < addresses.length; i++) addresses[i].setStyle({ width: inputwidth + 'px' }); - } } function onMailEditorClose(event) {