summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-08-27 13:30:54 +0000
committeralecpl <alec@alec.pl>2010-08-27 13:30:54 +0000
commit882b0f5e7f3514d56649923b02583149d80af56b (patch)
tree8cc4b1b9cc508cf14a7c2e21763b5a1f8628e24c /program
parenteb9eff07115b6b54bbd343d345189a6861e0ae78 (diff)
- Fix focus position after initial signature change in html editor
Diffstat (limited to 'program')
-rw-r--r--program/js/editor.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/js/editor.js b/program/js/editor.js
index 6cf3c6aaf..938aa82f6 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -54,8 +54,8 @@ function rcmail_editor_init(skin_path, editor_lang, spellcheck, mode)
spellchecker_languages : (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'),
spellchecker_rpc_url : '?_task=utils&_action=spell&tiny=1',
gecko_spellcheck : true,
- relative_urls : false,
remove_script_host : false,
+ relative_urls : false,
rc_client : rcmail,
oninit : 'rcmail_editor_callback'
});
@@ -65,8 +65,11 @@ function rcmail_editor_init(skin_path, editor_lang, spellcheck, mode)
function rcmail_editor_callback(editor)
{
var editor, elem = rcube_find_object('_from');
- if (elem && elem.type=='select-one')
+ if (elem && elem.type=='select-one') {
rcmail.change_identity(elem);
+ // Focus previously focused element
+ rcmail.env.compose_focus_elem.focus();
+ }
// set tabIndex and set focus to element that was focused before
rcmail_editor_tabindex(rcmail.env.compose_focus_elem && rcmail.env.compose_focus_elem.id == rcmail.env.composebody);
// Trigger resize (needed for proper editor resizing in some browsers using default skin)