From b7f3808824d7da5f2c3cc1c39a0fa5c66764592f Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Wed, 16 Apr 2014 14:00:34 +0200 Subject: [PATCH] [FIX]modal not correctly destroying from DOM at exit bzr revid: csn@openerp.com-20140416120034-sps3a7dc2mgpwfzt --- addons/web/static/src/js/chrome.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 4456080ee51..fca55957fd7 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -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();