mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 00:43:20 +01:00
* eMail: handle focus problem experienced under IE10 (single BrowserInstance) for forward
This commit is contained in:
parent
d4f4b518fa
commit
853adeb619
@ -781,7 +781,7 @@
|
||||
#if (isset($GLOBALS['egw_info']['server']['enabled_spellcheck'])) $mode = 'egw_simple_spellcheck';
|
||||
$style="border:0px; width:100%; height:400px;";
|
||||
// dont run purify, as we already did that (getCleanHTML).
|
||||
$this->t->set_var('tinymce', html::fckEditorQuick('body', $mode, $sessionData['body'],'400px','100%',false,'0px',($_focusElement=='body'?true:false)));
|
||||
$this->t->set_var('tinymce', html::fckEditorQuick('body', $mode, $sessionData['body'],'400px','100%',false,'0px',($_focusElement=='body'?true:false),($_focusElement!='body'?'parent.setToFocus("'.$_focusElement.'");':'')));
|
||||
$this->t->set_var('mimeType', 'html');
|
||||
$ishtml=1;
|
||||
} else {
|
||||
|
@ -191,39 +191,46 @@
|
||||
<!-- BEGIN attachment -->
|
||||
<script language="javascript1.2">
|
||||
// position cursor in top form field of focusElement
|
||||
toFocus = "{focusElement}";
|
||||
if (toFocus=='subject')
|
||||
{
|
||||
sString = document.doit.fm_compose_subject.value;
|
||||
document.doit.fm_compose_subject.selectionStart = document.doit.fm_compose_subject.selectionEnd = sString.length;
|
||||
document.doit.fm_compose_subject.focus();
|
||||
}
|
||||
if (toFocus=='to')
|
||||
{
|
||||
sString = document.doit.elements["address[]"][0].value;
|
||||
document.doit.elements["address[]"][0].selectionStart = document.doit.elements["address[]"][0].selectionEnd = sString.length;
|
||||
document.doit.elements["address[]"][0].focus();
|
||||
}
|
||||
if (toFocus=='body')
|
||||
{
|
||||
var htmlFlag = document.getElementsByName('_is_html')[0];
|
||||
var toFocus = "{focusElement}";
|
||||
setToFocus(toFocus);
|
||||
|
||||
// textmode
|
||||
if (htmlFlag.value==0)
|
||||
function setToFocus(focusTo)
|
||||
{
|
||||
//alert(toFocus);
|
||||
if (typeof focusTo == "undefined") focusTo = toFocus;
|
||||
if (focusTo=='subject')
|
||||
{
|
||||
document.doit.body.selectionStart = document.doit.body.selectionEnd = 0;
|
||||
document.doit.body.focus();
|
||||
}
|
||||
//htmlMode
|
||||
if (htmlFlag.value==1)
|
||||
{
|
||||
// focus on subject as I could not figure out jet how to focus on htmlTextArea of CKEditor
|
||||
sString = document.doit.fm_compose_subject.value;
|
||||
document.doit.fm_compose_subject.selectionStart = document.doit.fm_compose_subject.selectionEnd = sString.length;
|
||||
document.doit.fm_compose_subject.focus();
|
||||
// the actual focussing is done in class.html.inc.php function fckEditor
|
||||
}
|
||||
}
|
||||
if (focusTo=='to')
|
||||
{
|
||||
sString = document.doit.elements["address[]"][0].value;
|
||||
document.doit.elements["address[]"][0].selectionStart = document.doit.elements["address[]"][0].selectionEnd = sString.length;
|
||||
document.doit.elements["address[]"][0].focus();
|
||||
}
|
||||
if (focusTo=='body')
|
||||
{
|
||||
var htmlFlag = document.getElementsByName('_is_html')[0];
|
||||
|
||||
// textmode
|
||||
if (htmlFlag.value==0)
|
||||
{
|
||||
document.doit.body.selectionStart = document.doit.body.selectionEnd = 0;
|
||||
document.doit.body.focus();
|
||||
}
|
||||
//htmlMode
|
||||
if (htmlFlag.value==1)
|
||||
{
|
||||
// focus on subject as I could not figure out jet how to focus on htmlTextArea of CKEditor
|
||||
sString = document.doit.fm_compose_subject.value;
|
||||
document.doit.fm_compose_subject.selectionStart = document.doit.fm_compose_subject.selectionEnd = sString.length;
|
||||
document.doit.fm_compose_subject.focus();
|
||||
// the actual focussing is done in class.html.inc.php function fckEditor
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<fieldset class="bordertop"><legend>{lang_attachments}</legend>
|
||||
|
Loading…
Reference in New Issue
Block a user