summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-11 12:46:46 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-07-11 12:46:46 +0000
commit2de276c7dd6c0b9d16bbb4525d7b7180facb1af1 (patch)
treed7909e1622d4f7faeccb8a93f61342fb501a52b5 /roundcubemail/program
parentbe0a218746791c5bb90b282b1e48199ce2cb3a9c (diff)
- Fix HTML editor tabIndex setting (#1485972)
git-svn-id: https://svn.roundcube.net/trunk@2733 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/js/editor.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/roundcubemail/program/js/editor.js b/roundcubemail/program/js/editor.js
index 6826af847..ed7c4f9e8 100644
--- a/roundcubemail/program/js/editor.js
+++ b/roundcubemail/program/js/editor.js
@@ -17,7 +17,8 @@
function rcmail_editor_init(skin_path, editor_lang, spellcheck, mode)
{
if (mode == 'identity')
- tinyMCE.init({ mode : 'textareas',
+ tinyMCE.init({
+ mode : 'textareas',
editor_selector : 'mce_editor',
apply_source_formatting : true,
theme : 'advanced',
@@ -62,8 +63,21 @@ function rcmail_editor_init(skin_path, editor_lang, spellcheck, mode)
function rcmail_editor_callback(editor)
{
var input_from = rcube_find_object('_from');
- if(input_from && input_from.type=='select-one')
+ if (input_from && input_from.type=='select-one')
rcmail.change_identity(input_from);
+ // set tabIndex
+ rcmail_editor_tabindex()
+}
+
+// set tabIndex on tinyMCE editor
+function rcmail_editor_tabindex()
+{
+ if (rcmail.env.task == 'mail') {
+ var textarea = tinyMCE.get('compose-body').getElement();
+ var editor = tinyMCE.get('compose-body').getContentAreaContainer().childNodes[0];
+ if (textarea && editor)
+ editor.tabIndex = textarea.tabIndex;
+ }
}
// switch html/plain mode
@@ -78,6 +92,7 @@ function rcmail_toggle_editor(ishtml, textAreaId, flagElement)
rcmail.plain2html(composeElement.value, textAreaId);
tinyMCE.execCommand('mceAddControl', true, textAreaId);
+ rcmail_editor_tabindex();
if (flagElement && (flag = rcube_find_object(flagElement)))
flag.value = '1';
}