diff options
author | thomascube <thomas@roundcube.net> | 2010-07-31 09:48:46 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2010-07-31 09:48:46 +0000 |
commit | 5cff852b07b83ddf330fcaffd0843eb3cad6d5ee (patch) | |
tree | 7f38865196239140ea5e3a56dd279811fe268ff0 /program/js/app.js | |
parent | 7b808b585bc80f25bc9565cc5737bfb1293a1d7c (diff) |
Disable active spell check in tinyMCE before switching to plaintext mode (#1486870) + focus message field after mode switch
Diffstat (limited to 'program/js/app.js')
-rw-r--r-- | program/js/app.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/program/js/app.js b/program/js/app.js index a9da55744..c4ddb21e2 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2815,13 +2815,14 @@ function rcube_webmail() tinyMCE.execCommand('mceAddControl', false, props.id); } else { - var thisMCE = tinyMCE.get(props.id), - existingHtml = thisMCE.getContent(); - - if (existingHtml) { + var thisMCE = tinyMCE.get(props.id), existingHtml; + if (thisMCE.plugins.spellchecker && thisMCE.plugins.spellchecker.active) + thisMCE.execCommand('mceSpellCheck', false); + + if (existingHtml = thisMCE.getContent()) { if (!confirm(this.get_label('editorwarning'))) { return false; - } + } this.html2plain(existingHtml, props.id); } tinyMCE.execCommand('mceRemoveControl', false, props.id); |