summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-07-08 10:53:06 +0200
committerAleksander Machniak <alec@alec.pl>2013-07-08 10:53:06 +0200
commit3b944edb02a838e92f5f849b1266f157ccfb7040 (patch)
tree15df66c1568a4080ce3b69ef6c071b71813f5945 /program/js/app.js
parentcc02a90f92aafd005166821b3e698dc19a3aa777 (diff)
Fix bug where signature wasn't changed on identity selection when editing a draft (#1489229)
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 19ece01d2..04fb9cdb4 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -3065,7 +3065,7 @@ function rcube_webmail()
this.set_caret_pos(input_message, this.env.top_posting ? 0 : $(input_message).val().length);
// add signature according to selected identity
// if we have HTML editor, signature is added in callback
- if (input_from.prop('type') == 'select-one' && !this.env.opened_extwin) {
+ if (input_from.prop('type') == 'select-one') {
this.change_identity(input_from[0]);
}
}
@@ -3402,6 +3402,15 @@ function rcube_webmail()
if (!show_sig)
show_sig = this.env.show_sig;
+ // first function execution
+ if (!this.env.identities_initialized) {
+ this.env.identities_initialized = true;
+ if (this.env.show_sig_later)
+ this.env.show_sig = true;
+ if (this.env.opened_extwin)
+ return;
+ }
+
var i, rx, cursor_pos, p = -1,
id = obj.options[obj.selectedIndex].value,
input_message = $("[name='_message']"),