From d7284e4bd1a49a477f58ea261f68c3ba9b23acb7 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 5 Feb 2014 22:31:46 +0000 Subject: [PATCH] Fix admin JS destructor not called when tab closed. Fixes empty window when opening admin tab after close. --- admin/js/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/js/app.js b/admin/js/app.js index e6b714c29b..e89aed4356 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -43,6 +43,9 @@ app.classes.admin = AppJS.extend( */ destroy: function() { + this.iframe = null; + this.splitter = null; + // call parent this._super.apply(this, arguments); }, @@ -118,8 +121,8 @@ app.classes.admin = AppJS.extend( linkHandler: function(_url) { var matches; - if (this.iframe != null && !_url.match('menuaction=admin.admin_ui.index') || - (matches = _url.match(/menuaction=admin.admin_ui.index.*&load=([^&]+)/))) + if (_url !='about:blank'&& (this.iframe != null && !_url.match('menuaction=admin.admin_ui.index') || + (matches = _url.match(/menuaction=admin.admin_ui.index.*&load=([^&]+)/)))) { if (matches) {