From 14d494fd993a8530e41f65d548dd91e4a86c91b9 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 28 Sep 2011 09:00:25 +0000 Subject: - Fix misleading display when chaning editor type (#1488104), fix handling of custom commands result --- program/js/editor.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'program/js/editor.js') diff --git a/program/js/editor.js b/program/js/editor.js index 906faece7..63186fb02 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -115,13 +115,17 @@ function rcmail_toggle_editor(select, textAreaId, flagElement) if (flagElement && (flag = rcube_find_object(flagElement))) flag.value = '1'; } - else { - if (!res && select.tagName == 'SELECT') - select.value = 'html'; + else if (res) { if (flagElement && (flag = rcube_find_object(flagElement))) flag.value = '0'; if (rcmail.env.composebody) rcube_find_object(rcmail.env.composebody).focus(); } + else { // !res + if (select.tagName == 'SELECT') + select.value = 'html'; + else if (select.tagName == 'INPUT') + select.checked = true; + } } -- cgit v1.2.3