summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-12 09:16:22 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-12 09:16:22 +0100
commit4340d5e63424ffdea2788701c5539c9cdc162eda (patch)
tree5f675ef121a45ae9f52e04864202ac56c07d75ea /program/js/app.js
parentd0751fba0e98ea312ade5c6d6fdb4169cb8b5756 (diff)
Fix excessive LFs at the end of composed message with top_posting=true (#1488797)
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 7764c6c86..0f5a60c6f 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3413,6 +3413,10 @@ function rcube_webmail()
message = message.substring(0, p) + sig + message.substring(p, message.length);
cursor_pos = p - 1;
}
+ else if (!message) { // empty message
+ cursor_pos = 0;
+ message = '\n\n' + sig;
+ }
else if (pos = this.get_caret_pos(input_message.get(0))) { // at cursor position
message = message.substring(0, pos) + '\n' + sig + '\n\n' + message.substring(pos, message.length);
cursor_pos = pos;