* eMail: handle focus problem experienced under IE10 (single BrowserInstance) for forward

This commit is contained in:
Klaus Leithoff 2013-04-08 13:02:21 +00:00
parent d4f4b518fa
commit 853adeb619
2 changed files with 35 additions and 28 deletions

View File

@ -781,7 +781,7 @@
#if (isset($GLOBALS['egw_info']['server']['enabled_spellcheck'])) $mode = 'egw_simple_spellcheck'; #if (isset($GLOBALS['egw_info']['server']['enabled_spellcheck'])) $mode = 'egw_simple_spellcheck';
$style="border:0px; width:100%; height:400px;"; $style="border:0px; width:100%; height:400px;";
// dont run purify, as we already did that (getCleanHTML). // 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'); $this->t->set_var('mimeType', 'html');
$ishtml=1; $ishtml=1;
} else { } else {

View File

@ -191,21 +191,27 @@
<!-- BEGIN attachment --> <!-- BEGIN attachment -->
<script language="javascript1.2"> <script language="javascript1.2">
// position cursor in top form field of focusElement // position cursor in top form field of focusElement
toFocus = "{focusElement}"; var toFocus = "{focusElement}";
if (toFocus=='subject') setToFocus(toFocus);
function setToFocus(focusTo)
{ {
//alert(toFocus);
if (typeof focusTo == "undefined") focusTo = toFocus;
if (focusTo=='subject')
{
sString = document.doit.fm_compose_subject.value; 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.selectionStart = document.doit.fm_compose_subject.selectionEnd = sString.length;
document.doit.fm_compose_subject.focus(); document.doit.fm_compose_subject.focus();
} }
if (toFocus=='to') if (focusTo=='to')
{ {
sString = document.doit.elements["address[]"][0].value; 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].selectionStart = document.doit.elements["address[]"][0].selectionEnd = sString.length;
document.doit.elements["address[]"][0].focus(); document.doit.elements["address[]"][0].focus();
} }
if (toFocus=='body') if (focusTo=='body')
{ {
var htmlFlag = document.getElementsByName('_is_html')[0]; var htmlFlag = document.getElementsByName('_is_html')[0];
// textmode // textmode
@ -223,7 +229,8 @@ if (toFocus=='body')
document.doit.fm_compose_subject.focus(); document.doit.fm_compose_subject.focus();
// the actual focussing is done in class.html.inc.php function fckEditor // the actual focussing is done in class.html.inc.php function fckEditor
} }
} }
};
</script> </script>
<fieldset class="bordertop"><legend>{lang_attachments}</legend> <fieldset class="bordertop"><legend>{lang_attachments}</legend>