From c761ab2c5b3a789077dbc5bc0688b96edaf30a06 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 13 Mar 2018 10:59:55 +0100 Subject: [PATCH] [FIX] mail: redirect: prevent double-clicks This rev. increases the wait interval of the redirect handler called when a document is clicked in a mail thread (e.g. in the 'Inbox' in Discuss). This increases the protection against double-clicks (preventing the document from being opened twice, thus making twice the required RPCs, and from appearing twice in the breadcrumbs). A more robust solution (at the ActionManager level) will be developed for saas-11.2 (where the ActionManager has been refactored and is testable). --- addons/mail/static/src/js/thread.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/js/thread.js b/addons/mail/static/src/js/thread.js index f63c7073af9..fcb1dda324f 100644 --- a/addons/mail/static/src/js/thread.js +++ b/addons/mail/static/src/js/thread.js @@ -229,7 +229,7 @@ var Thread = Widget.extend({ } else { this.trigger('redirect', options.model, options.id); } - }, 200, true), + }, 500, true), on_click_show_more: function () { this.trigger('load_more_messages');