Try to set focus back to plain text area when replying to a plain text mail

This commit is contained in:
Hadi Nategh 2022-09-29 11:27:47 +02:00
parent ba8c5101ac
commit 60aa0035a7

View File

@ -361,7 +361,13 @@ app.classes.mail = AppJS.extend(
// focus
jQuery(plainText.getDOMNode()).focus();
// get the cursor to the top of the textarea
if (typeof plainText.getDOMNode().setSelectionRange !='undefined' && !jQuery(plainText.getDOMNode()).is(":hidden")) plainText.getDOMNode().setSelectionRange(0,0);
if (typeof plainText.getDOMNode().setSelectionRange !='undefined' && !jQuery(plainText.getDOMNode()).is(":hidden"))
{
setTimeout(function(){
plainText.getDOMNode().setSelectionRange(0,0)
plainText.focus();
}, 2000);
}
}
else if(textAreaWidget && textAreaWidget.tinymce)
{