diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-05-05 19:14:53 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-05-05 19:14:53 +0000 |
| commit | 77915733634c6b377dd8f3294d0d72d170f51b8f (patch) | |
| tree | 41c85dabe2d40a40d40f6de201445ffb2bceabc8 /roundcubemail/program/js/editor.js | |
| parent | 6601c9e127d61ec04a62c452a9f611e9d15ba171 (diff) | |
- Set focus to editor on reply in HTML mode (#1486632)
- Fix composing in HTML jumps cursor to body instead of recipients (#1486674)
git-svn-id: https://svn.roundcube.net/trunk@3594 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/editor.js')
| -rw-r--r-- | roundcubemail/program/js/editor.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/roundcubemail/program/js/editor.js b/roundcubemail/program/js/editor.js index 1b1129ecc..34511ce0b 100644 --- a/roundcubemail/program/js/editor.js +++ b/roundcubemail/program/js/editor.js @@ -63,11 +63,18 @@ function rcmail_editor_init(skin_path, editor_lang, spellcheck, mode) // react to real individual tinyMCE editor init function rcmail_editor_callback(editor) { - var input_from = rcube_find_object('_from'); - if (input_from && input_from.type=='select-one') - rcmail.change_identity(input_from); + var editor, elem = rcube_find_object('_from'); + if (elem && elem.type=='select-one') + rcmail.change_identity(elem); // set tabIndex rcmail_editor_tabindex(); + // set focus to element that was focused before + if (elem = rcmail.env.compose_focus_elem) { + if (elem.id == rcmail.env.composebody && (editor = tinyMCE.get(rcmail.env.composebody))) + editor.getWin().focus(); + else + elem.focus(); + } } // set tabIndex on tinyMCE editor |
