From b4387108de968e3e80cd43d6df746049b0e3fbc8 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Fri, 11 Jan 2019 09:14:13 +0000 Subject: [PATCH] [FIX] web_tour: clear call stack between each step This rev. concerns automatic executions of tours. It makes each step executed in a setTimeout, thus ensuring that the call stack has been emptied before executing the next step (which is the case when the user manually executes the flow). --- addons/web_tour/static/src/js/tour_manager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web_tour/static/src/js/tour_manager.js b/addons/web_tour/static/src/js/tour_manager.js index 7b50c2de75a..32e7af075bf 100644 --- a/addons/web_tour/static/src/js/tour_manager.js +++ b/addons/web_tour/static/src/js/tour_manager.js @@ -171,7 +171,10 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { if (this.running_tour && this.running_tour_timeout === undefined) { this._set_running_tour_timeout(this.running_tour, this.active_tooltips[this.running_tour]); } - this._check_for_tooltip(this.active_tooltips[tour_name], tour_name); + var self = this; + setTimeout(function () { + self._check_for_tooltip(self.active_tooltips[tour_name], tour_name); + }); } else { for (var tourName in this.active_tooltips) { var tip = this.active_tooltips[tourName];