| | |
| | | rcmail.change_identity(elem); |
| | | // Focus previously focused element |
| | | if (fe && fe.id != rcmail.env.composebody) { |
| | | window.focus(); // for WebKit (#1486674) |
| | | fe.focus(); |
| | | // use setTimeout() for IE9 (#1488541) |
| | | window.setTimeout(function() { |
| | | window.focus(); // for WebKit (#1486674) |
| | | fe.focus(); |
| | | }, 10); |
| | | } |
| | | } |
| | | |
| | |
| | | if (flagElement && (flag = rcube_find_object(flagElement))) |
| | | flag.value = '1'; |
| | | } |
| | | else { |
| | | if (!res && select.tagName == 'SELECT') |
| | | select.value = 'html'; |
| | | else if (res) { |
| | | if (flagElement && (flag = rcube_find_object(flagElement))) |
| | | flag.value = '0'; |
| | | |
| | | if (rcmail.env.composebody) |
| | | rcube_find_object(rcmail.env.composebody).focus(); |
| | | } |
| | | else { // !res |
| | | if (select.tagName == 'SELECT') |
| | | select.value = 'html'; |
| | | else if (select.tagName == 'INPUT') |
| | | select.checked = true; |
| | | } |
| | | } |