From 7534f6fc5941da555bbd959bbbbad9aefed8ac14 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 1 Jul 2010 12:04:58 +0000 Subject: - fix HTML editor layer resize after first switch --- skins/default/functions.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'skins') diff --git a/skins/default/functions.js b/skins/default/functions.js index 6422d1882..29e7049a7 100644 --- a/skins/default/functions.js +++ b/skins/default/functions.js @@ -334,7 +334,7 @@ init_compose_form: function() resize_compose_body: function() { - var ed, div = $('#compose-div'), w = div.width(), h = div.height(); + var div = $('#compose-div'), w = div.width(), h = div.height(); w = w-4; h = h-25; @@ -349,6 +349,11 @@ resize_compose_body: function() } }, +resize_compose_body_ev: function() +{ + window.setTimeout(function(){rcmail_ui.resize_compose_body();}, 100); +}, + show_header_form: function(id) { var row, s, @@ -437,7 +442,7 @@ function rcube_init_mail_ui() rcmail.addEventListener('menu-open', 'open_listmenu', rcmail_ui); rcmail.addEventListener('menu-save', 'save_listmenu', rcmail_ui); rcmail.addEventListener('aftersend-attachment', 'show_uploadform', rcmail_ui); - rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body', rcmail_ui); + rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); if (rcmail.env.action == 'compose') -- cgit v1.2.3