summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-07-09 08:45:05 +0200
committerAleksander Machniak <alec@alec.pl>2014-07-09 08:45:05 +0200
commit1f164e4526a57ec25c2509d984e671ec411dc1d2 (patch)
tree1ac52395df47233d6e69f5b9582a6bc0e026f8ad /program/js/app.js
parentd81539af3135428fafe5ea9764755aa1a697cbb4 (diff)
Revert "Fix bug where compose storage wasn't cleared on page unload (#1489818)"
This reverts commit d81539af3135428fafe5ea9764755aa1a697cbb4.
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/program/js/app.js b/program/js/app.js
index c635f6002..31c23dd0e 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -655,6 +655,9 @@ function rcube_webmail()
if (this.task == 'mail' && this.env.action == 'compose' && $.inArray(command, this.env.compose_commands) < 0 && !this.env.server_error) {
if (this.cmp_hash != this.compose_field_hash() && !confirm(this.get_label('notsentwarning')))
return false;
+
+ // remove copy from local storage if compose screen is left intentionally
+ this.remove_compose_data(this.env.compose_id);
}
this.last_command = command;
@@ -3800,11 +3803,6 @@ function rcube_webmail()
ref.compose_type_activity_last = ref.compose_type_activity;
}
}, 5000);
-
- // remove data from local storage if compose screen is left
- $(window).unload(function() {
- ref.remove_compose_data(ref.env.compose_id);
- });
}
// Unlock interface now that saving is complete