[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:
Cedric Snauwaert 2014-07-29 16:07:26 +02:00 committed by Denis Ledoux
parent 88c022dfc8
commit 7127d2cdc3
1 changed files with 1 additions and 1 deletions

View File

@ -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() {