[FIX]web_tour:avoid unnecessary traceback

In certain case, a non blocking traceback pops-up.
It happens when the page loads, if the dom is modified
before the tour has been fully loaded.

Theorical steps to reproduce:
- Open a page with an active tour
- Trigger any domain change before the tip-dot is loaded

On every change in the DOM, the MutationObserver tries
to update the page. If the tip-dot has not been loaded yet,
it will try to update the position of a non-existing element.
In that case, we simply ignore it. The update will be called
anyway when the tip-dot has finished his loading.

opws:
1923348
1965964
2011027
2008708
2001867
2000228
1998906
1972914
1972629
1963173
1961373
1956962
1949591
1947390
1947286
1944577
1944459
1941764
1938887
1936518
1935831
1934788
1934471
1934225
2006977
1970672
1931721
1931593

closes odoo/odoo#34199

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
jev-odoo
2019-06-18 07:45:55 +00:00
parent 25745d8515
commit 5bb9a8b418
+1
View File
@@ -146,6 +146,7 @@ var Tip = Widget.extend({
},
_reposition: function () {
if (this.tip_opened) return;
if (!this.$el) return;
this.$el.removeClass("o_animated");
// Reverse left/right position if direction is right to left