diff --git a/package.json b/package.json index da77847e..b5d216fc 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "c9.ide.ace.split": "#0ae0151c78", "c9.ide.ace.statusbar": "#2155083cf6", "c9.ide.ace.stripws": "#cf0f42ac59", - "c9.ide.behaviors": "#6530a20004", + "c9.ide.behaviors": "#13d2c56564", "c9.ide.closeconfirmation": "#cee4674141", "c9.ide.configuration": "#a9066299a2", "c9.ide.dialog.wizard": "#7667ec79a8", diff --git a/plugins/c9.ide.editors/pane.js b/plugins/c9.ide.editors/pane.js index 9a040d9c..d796518f 100644 --- a/plugins/c9.ide.editors/pane.js +++ b/plugins/c9.ide.editors/pane.js @@ -103,23 +103,30 @@ define(function(require, module, exports) { emit("afterClose", event); if (tab.aml.$amlDestroyed) { - tab.unload(e); + tab.unload(event); closing--; } + else if (tab.meta.$skipAnimation) { + closeNow(); + } else { tab.aml.on("afterclose", function(){ - if (tab.meta.$closeSync) { - tab.unload(e); - closing--; - } - else { - setTimeout(function(){ - tab.unload(e); - closing--; - }); - } + closeNow(); }); } + + function closeNow(){ + if (tab.meta.$closeSync) { + tab.unload(event); + closing--; + } + else { + setTimeout(function(){ + tab.unload(event); + closing--; + }); + } + } }, overactivetab: true, childNodes: [ diff --git a/plugins/c9.ide.editors/tab.js b/plugins/c9.ide.editors/tab.js index 83f07223..ea647873 100644 --- a/plugins/c9.ide.editors/tab.js +++ b/plugins/c9.ide.editors/tab.js @@ -304,7 +304,7 @@ define(function(require, module, exports) { if (rule) ui.removeStyleRule(rule, stylesheet); // If there are no more pages left, reset location - var last = amlPane.getPages().length === 0; + var last = e.last || amlPane.getPages().length === 0; if (last) apf.setStyleClass(amlPane.$ext, "empty");