kopia lustrzana https://github.com/c9/core
fix tab tests
rodzic
a52b93b35d
commit
9bb4f1d886
|
@ -108,10 +108,16 @@ define(function(require, module, exports) {
|
|||
}
|
||||
else {
|
||||
tab.aml.on("afterclose", function(){
|
||||
setTimeout(function(){
|
||||
if (tab.meta.$closeSync) {
|
||||
tab.unload(e);
|
||||
closing--;
|
||||
});
|
||||
}
|
||||
else {
|
||||
setTimeout(function(){
|
||||
tab.unload(e);
|
||||
closing--;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -280,7 +280,9 @@ define(function(require, module, exports) {
|
|||
|
||||
// @todo Explain difference with unload in docs
|
||||
function close(noAnim) {
|
||||
if (!amlPane.remove) return false;
|
||||
amlPane.remove(amlTab, null, noAnim);
|
||||
return true;
|
||||
}
|
||||
|
||||
/***** Lifecycle *****/
|
||||
|
@ -291,10 +293,8 @@ define(function(require, module, exports) {
|
|||
|
||||
plugin.on("beforeUnload", function(){
|
||||
if (!plugin.meta.$closing) {
|
||||
plugin.document.meta.$ignoreSave = true;
|
||||
close();
|
||||
delete plugin.document.meta.$ignoreSave;
|
||||
return false;
|
||||
if (close())
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -787,7 +787,10 @@ define(function(require, module, exports) {
|
|||
var pane = list[i], nodes = pane.getTabs();
|
||||
for (var j = nodes.length - 1; j >= 0; j--) {
|
||||
var tab = nodes[j];
|
||||
if (!soft) tab.unload();
|
||||
if (!soft) {
|
||||
tab.meta.$closeSync = true;
|
||||
tab.unload();
|
||||
}
|
||||
else {
|
||||
tab.aml.parentNode.removeChild(tab.aml);
|
||||
tab.pane = null;
|
||||
|
|
Ładowanie…
Reference in New Issue