From f58450dbe923c8868f552016131da4d90be0daa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 2 Dec 2015 11:04:12 +0100 Subject: [PATCH] [FIX] web_kanban: properly removes nvd3 tooltips with the recent update of nvd3 to the last version, we fixed a lot of tooltip issues, but we introduced at least a new problem: when a view is detached from the dom with a visible tooltip, it no longer is cleaned up. In this commit, we simply remove all nvtooltips when we detach a kanban view (necessary because dashboards inherits from kanban). This is not really an elegant way to solve the issue, but at least it works. any improvement is welcome. --- addons/web/static/src/js/views/graph_view.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/web/static/src/js/views/graph_view.js b/addons/web/static/src/js/views/graph_view.js index 8a604640fc9..f8f1bba909a 100644 --- a/addons/web/static/src/js/views/graph_view.js +++ b/addons/web/static/src/js/views/graph_view.js @@ -19,6 +19,10 @@ var GraphView = View.extend({ icon: 'fa-bar-chart', view_type: 'graph', + on_detach_callback: function () { + $('body > .nvtooltip').remove(); + }, + init: function(parent, dataset, view_id, options) { this._super(parent, dataset, view_id, options);