fix +8094 Pane/tab & navigation errors

pull/117/merge
nightwing 2015-07-03 14:23:07 +04:00
rodzic 2aac81b7e7
commit d025c0a5be
2 zmienionych plików z 14 dodań i 2 usunięć

Wyświetl plik

@ -81,7 +81,7 @@
"c9.ide.ace.split": "#0ae0151c78",
"c9.ide.ace.statusbar": "#d95be89d53",
"c9.ide.ace.stripws": "#cf0f42ac59",
"c9.ide.behaviors": "#6aad7006a0",
"c9.ide.behaviors": "#c3a9402cde",
"c9.ide.closeconfirmation": "#a28bfd8272",
"c9.ide.configuration": "#adf50fdaa2",
"c9.ide.dialog.wizard": "#7667ec79a8",

Wyświetl plik

@ -230,7 +230,7 @@ define(function(require, module, exports) {
}
function hsplit(far, vertically, split, ignore) {
if (!split || !split.parentNode) split = amlPane;
if (!$isValidSplit(split) || !split.parentNode) split = amlPane;
queue = []; // Used for resizing later
@ -270,6 +270,16 @@ define(function(require, module, exports) {
return newtab.cloud9pane;
}
function $isValidSplit(container) {
// would be better to use tabmanager.containers instead
while (container) {
if (container.localName == "bar")
break;
container = container.parentNode;
}
return !!container;
}
// Resize all editors in the queue
function resizeAll(){
queue.forEach(function(node) {
@ -399,6 +409,8 @@ define(function(require, module, exports) {
}
if (next) {
if (!$isValidSplit(next))
return;
// Moving from horizontal to vertical or vice verse
if (force || next.parentNode.localName != amlPane.parentNode.localName) {
var tosplit = force || next.parentNode.localName == "bar"