From a6f4af4f00a446a0ab7f534109624fc178ae6dd2 Mon Sep 17 00:00:00 2001 From: Martin Hebnes Pedersen Date: Tue, 18 Jul 2017 22:01:06 +0200 Subject: [PATCH] Web GUI: Unregister click events before btn re-use Fixes a bug where subsequent "Move to archive" actions resulted in attempting to redo the previous move. --- res/js/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/res/js/index.js b/res/js/index.js index be4df609..a5577fcf 100644 --- a/res/js/index.js +++ b/res/js/index.js @@ -490,7 +490,7 @@ function displayMessage(elem) { ); } } - + $('#reply_btn').off('click'); $('#reply_btn').click(function(evt){ $('#message_view').modal('hide'); @@ -504,6 +504,7 @@ function displayMessage(elem) { $('#composer').modal('show'); }); + $('#forward_btn').off('click'); $('#forward_btn').click(function(evt){ $('#message_view').modal('hide'); @@ -512,9 +513,11 @@ function displayMessage(elem) { $('#composer').modal('show'); }); + $('#delete_btn').off('click'); $('#delete_btn').click(function(evt){ deleteMessage(currentFolder, mid); }); + $('#archive_btn').off('click'); $('#archive_btn').click(function(evt){ archiveMessage(currentFolder, mid); });