[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.
This commit is contained in:
Géry Debongnie
2016-06-13 10:43:37 +02:00
parent 7e6ad941cf
commit dcc13079b7
@@ -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();