[FIX] web: fix multiple modal closing (e.g. set defaults)
move call trigger('closing') after the modal('hide') call to prevent element being destroyed before we could do that call leaving a backdrop visible
This commit is contained in:
parent
88c022dfc8
commit
7127d2cdc3
|
@ -183,12 +183,12 @@ instance.web.Dialog = instance.web.Widget.extend({
|
|||
*/
|
||||
close: function(reason) {
|
||||
if (this.dialog_inited && !this.__tmp_dialog_hiding) {
|
||||
this.trigger("closing", reason);
|
||||
if (this.$el.is(":data(bs.modal)")) { // may have been destroyed by closing signal
|
||||
this.__tmp_dialog_hiding = true;
|
||||
this.$dialog_box.modal('hide');
|
||||
this.__tmp_dialog_hiding = undefined;
|
||||
}
|
||||
this.trigger("closing", reason);
|
||||
}
|
||||
},
|
||||
_closing: function() {
|
||||
|
|
Loading…
Reference in New Issue