From 88e935fa01beb6278d4d46b2e78f4eff7823410f Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Tue, 11 Sep 2018 15:36:10 +0200 Subject: [PATCH] [FIX] web: remove display none timeout Since 6dc37ee461c9 a d-none class was added to hide the menus in the navbar during the start of the navbar. A timeout was set to mimic the old behavior and let enought time to bind events on menus. When the project app was installed alongside with all other apps on the runbot, there was not enough place in the navbar. This resulted in a race condition at the begining of the project tour. With this commit, the d-none class is immediately removed and then the menu are started (binded to events) before the tour has the hand to continue its next step. --- addons/web/static/src/js/chrome/web_client.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/js/chrome/web_client.js b/addons/web/static/src/js/chrome/web_client.js index d3ebabfab1e..622d9d681ec 100644 --- a/addons/web/static/src/js/chrome/web_client.js +++ b/addons/web/static/src/js/chrome/web_client.js @@ -47,11 +47,9 @@ return AbstractWebClient.extend({ // Start the menu once both systray and user menus are rendered // to prevent overflows while loading return $.when(systray_menu_loaded, user_menu_loaded).then(function() { - self.menu.start(); self.bind_hashchange(); - setTimeout(function () { - self.menu.$el.removeClass('d-none'); - }, 200) + self.menu.$el.removeClass('d-none'); + self.menu.start(); }); },