From 70a0738211aec65bff1217130e343c3be2aab926 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 14 Jan 2011 14:25:52 -0700 Subject: [PATCH] Fix some compose screen resize issues --- imp/js/compose-dimp.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/imp/js/compose-dimp.js b/imp/js/compose-dimp.js index 237944dd6..ab1843acb 100644 --- a/imp/js/compose-dimp.js +++ b/imp/js/compose-dimp.js @@ -429,10 +429,10 @@ var DimpCompose = { if (Object.isUndefined(this.rte_loaded)) { CKEDITOR.on('instanceReady', function(evt) { - this.resizeMsgArea(); this.RTELoading('hide'); this.rte.focus(); this.rte_loaded = true; + this.resizeMsgArea(); }.bind(this)); CKEDITOR.on('instanceDestroyed', function(evt) { this.RTELoading('hide'); @@ -803,7 +803,7 @@ var DimpCompose = { mah = document.viewport.getHeight() - cmp.offsetTop; - if (IMP_Compose_Base.editor_on) { + if (this.rte_loaded) { [ 'margin', 'padding', 'border' ].each(function(s) { [ 'Top', 'Bottom' ].each(function(h) { var a = parseInt(cmp.getStyle(s + h), 10); @@ -814,7 +814,7 @@ var DimpCompose = { }); this.rte.resize('99%', mah - pad - 1, false); - } else { + } else if (!IMP_Compose_Base.editor_on) { /* If the line-height CSS value exists, use that. */ if (!(lh = msg.getStyle('line-height'))) { /* Logic: Determine the size of a given textarea row, divide @@ -835,6 +835,10 @@ var DimpCompose = { } } + if ($('rteloading') && $('rteloading').visible()) { + this.RTELoading(); + } + this.resizing = false; }, -- 2.11.0