diff options
| author | Christophe Monniez <moc@odoo.com> | 2018-09-11 15:36:10 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2018-09-11 20:19:17 +0200 |
| commit | 88e935fa01beb6278d4d46b2e78f4eff7823410f (patch) | |
| tree | 871d8db9d4f87b13f03e31d49849f8216e9a52a9 | |
| parent | a7aab13cc45e73d9ddadb028fa6f2d99755632a4 (diff) | |
[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.
| -rw-r--r-- | addons/web/static/src/js/chrome/web_client.js | 6 |
1 files 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(); }); }, |
