diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-07-31 09:48:46 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-07-31 09:48:46 +0000 |
| commit | a881c61ad69c8c16ab787958689ea73326f68281 (patch) | |
| tree | 5aaa1d42bf8a0ee93443b5731a74cd493ae1368a /roundcubemail/program/js/app.js | |
| parent | 91ffdc759436ca359975560eb9e42e1c6d9b5d6e (diff) | |
Disable active spell check in tinyMCE before switching to plaintext mode (#1486870) + focus message field after mode switch
git-svn-id: https://svn.roundcube.net/trunk@3846 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/app.js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index a9da55744..c4ddb21e2 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/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); |
