diff options
author | alecpl <alec@alec.pl> | 2011-09-28 09:00:25 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-09-28 09:00:25 +0000 |
commit | 14d494fd993a8530e41f65d548dd91e4a86c91b9 (patch) | |
tree | 6050d894b011c11a27797752db20a1eca47f4451 /program/js/editor.js | |
parent | 0c1cb2fed7c584b31aa7f4df7aa565781dfe0021 (diff) |
- Fix misleading display when chaning editor type (#1488104), fix handling of custom commands result
Diffstat (limited to 'program/js/editor.js')
-rw-r--r-- | program/js/editor.js | 10 |
1 files changed, 7 insertions, 3 deletions
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; + } } |