[FIX]modal not correctly destroying from DOM at exit
authorCedric Snauwaert <csn@openerp.com>
Wed, 16 Apr 2014 12:00:34 +0000 (14:00 +0200)
committerCedric Snauwaert <csn@openerp.com>
Wed, 16 Apr 2014 12:00:34 +0000 (14:00 +0200)
bzr revid: csn@openerp.com-20140416120034-sps3a7dc2mgpwfzt

addons/web/static/src/js/chrome.js

index 4456080..fca5595 100644 (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();