Skip to content

Commit

Permalink
[FIX] web: remove display none timeout
Browse files Browse the repository at this point in the history
Since 6dc37ee 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.
  • Loading branch information
d-fence authored and antonylesuisse committed Sep 11, 2018
1 parent a7aab13 commit 88e935f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions addons/web/static/src/js/chrome/web_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

},
Expand Down

0 comments on commit 88e935f

Please sign in to comment.