From 8042e41dc2b7a93298d71115dd1752aefeec8266 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Wed, 19 Nov 2014 11:03:23 -0500 Subject: [PATCH] Stop panel children before removing them Helps reduce some "javascript still running" errors. But not all. Signed-off-by: Thomas Berezansky --- Open-ILS/xul/staff_client/chrome/content/main/menu.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index e5788c863b..056e3bd5c9 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -2465,7 +2465,10 @@ commands: tab.setAttribute('id',unique_id); if (params.focus) tab.focus(); var panel = this.controller.view.panels.childNodes[ idx ]; - while ( panel.lastChild ) panel.removeChild( panel.lastChild ); + while ( panel.lastChild ) { + if (typeof panel.lastChild.webNavigation != 'undefined') panel.lastChild.webNavigation.stop(3); + panel.removeChild( panel.lastChild ); + } //We need to set tab.marc_edit_changed to false here, so if the user goes //back to the MARC edit tab from a newly retrieved record when they had //previously edited the record that used to be in the tab then -- 2.11.0