From dcc13079b7fd02d156ffc982cddfccfe684113bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 10 Jun 2016 13:07:03 +0200 Subject: [PATCH] [FIX] web: action manager and modals should interact correctly Before this commit, the action manager could in some case have a reference of a modal dialog, even after it has been destroyed (for example, when the "X" button has been clicked to close a modal). Unfortunately, it has some unexpected consequences, for example, the do_push_state method check the existence of self.dialog to update the url. --- addons/web/static/src/js/action_manager.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/web/static/src/js/action_manager.js b/addons/web/static/src/js/action_manager.js index c7f79070e8c..8d33f1ab4ac 100644 --- a/addons/web/static/src/js/action_manager.js +++ b/addons/web/static/src/js/action_manager.js @@ -691,6 +691,9 @@ var ActionManager = Widget.extend({ // underlying form view (see comments above) pre_dialog.on_close(); } + if (!pre_dialog) { + self.dialog = null; + } }; this.dialog.on("closed", null, this.dialog.on_close); this.dialog_widget = executor.widget();