[FIX]modal not correctly destroying from DOM at exit

bzr revid: csn@openerp.com-20140416120034-sps3a7dc2mgpwfzt
This commit is contained in:
Cedric Snauwaert 2014-04-16 14:00:34 +02:00
parent fef7f9adfd
commit b7f3808824
1 changed files with 2 additions and 1 deletions

View File

@ -212,8 +212,9 @@ instance.web.Dialog = instance.web.Widget.extend({
//we need this to put the instruction to remove modal from DOM at the end
//of the queue, otherwise it might already have been removed before the modal-backdrop
//is removed when pressing escape key
var $parent = this.$el.parents('.modal');
setTimeout(function () {
self.$el.parents('.modal').remove();
$parent.remove();
},0);
}
this._super();