diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-10-29 10:33:13 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-10-29 10:34:58 +0100 |
commit | 080f560e0fc2f910e410c0ca8cc68a88e0363a08 (patch) | |
tree | b8ae9ea2eecada90c48cc1620c205528620a96e3 /program/js | |
parent | b5fd858eb21da1a17dd4b3dd76c84f7b4eb805e3 (diff) |
Fix reply scrolling issue with text mode and start message below the quote (#1490114)
Conflicts:
program/js/app.js
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js index 323fd258c..6e0d6902f 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3128,7 +3128,7 @@ function rcube_webmail() if (!this.gui_objects.messageform) return false; - var input_from = $("[name='_from']"), + var i, pos, input_from = $("[name='_from']"), input_to = $("[name='_to']"), input_subject = $("input[name='_subject']"), input_message = $("[name='_message']").get(0), @@ -3157,17 +3157,24 @@ function rcube_webmail() // init live search events this.init_address_input_events(input_to, ac_props); - for (var i in ac_fields) { + for (i in ac_fields) { this.init_address_input_events($("[name='_"+ac_fields[i]+"']"), ac_props); } if (!html_mode) { - this.set_caret_pos(input_message, this.env.top_posting ? 0 : $(input_message).val().length); + pos = this.env.top_posting ? 0 : input_message.value.length; + this.set_caret_pos(input_message, pos); + // add signature according to selected identity // if we have HTML editor, signature is added in callback if (input_from.prop('type') == 'select-one') { this.change_identity(input_from[0]); } + + // scroll to the bottom of the textarea (#1490114) + if (pos) { + $(input_message).scrollTop(input_message.scrollHeight); + } } // check for locally stored compose data |