diff --git a/addons/web/static/src/js/chrome/web_client.js b/addons/web/static/src/js/chrome/web_client.js index db440cd742f..5d9f025c865 100644 --- a/addons/web/static/src/js/chrome/web_client.js +++ b/addons/web/static/src/js/chrome/web_client.js @@ -90,6 +90,10 @@ return AbstractWebClient.extend({ bind_hashchange: function() { var self = this; $(window).bind('hashchange', this.on_hashchange); + var didHashChanged = false; + $(window).one('hashchange', function () { + didHashChanged = true; + }); var state = $.bbq.getState(true); if (_.isEmpty(state) || state.action === "login") { @@ -100,6 +104,9 @@ return AbstractWebClient.extend({ args: [[session.uid], ['action_id']], }) .done(function(result) { + if (didHashChanged) { + return; + } var data = result[0]; if(data.action_id) { self.action_manager.doAction(data.action_id[0]);