From 6db82fbbf2cee9b83a12bfa62055265530a2f6c3 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 22 Aug 2017 17:53:52 +0200 Subject: [PATCH] * Mail: fix cursor jumping at the end of textarea in compose while switching from subject --- mail/js/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mail/js/app.js b/mail/js/app.js index f1a1ffdf3f..7338883324 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -236,6 +236,10 @@ app.classes.mail = AppJS.extend( this.mailvelopeAvailable(this.mailvelopeCompose); } var that = this; + var plainText = this.et2.getWidgetById('mail_plaintext'); + // set cursor to the begining of the textarea only for first focus + if (plainText) plainText.getDOMNode().setSelectionRange(0,0); + var textAreaWidget = this.et2.getWidgetById('mail_htmltext'); this.mail_isMainWindow = false; this.compose_fieldExpander_init();