From 882b0f5e7f3514d56649923b02583149d80af56b Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 27 Aug 2010 13:30:54 +0000 Subject: - Fix focus position after initial signature change in html editor --- program/js/editor.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'program') 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) -- cgit v1.2.3