From 9879e5ce51556914a9d1079d913005b706c9c404 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 2 Feb 2017 12:22:48 +0400 Subject: [PATCH] fix wrong tab getting focus when console is hiding --- plugins/c9.ide.console/console.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/plugins/c9.ide.console/console.js b/plugins/c9.ide.console/console.js index 0c4730a6..8df091c8 100644 --- a/plugins/c9.ide.console/console.js +++ b/plugins/c9.ide.console/console.js @@ -334,17 +334,12 @@ define(function(require, module, exports) { // tab we can find inside the tabs the focussed tab. if (tabs.focussedTab && getPanes().indexOf(tabs.focussedTab.pane) > -1) { + var tab; tabs.getPanes(tabs.container).every(function(pane) { - var tab = pane.getTab(); - if (!tab) { - tabs.focusTab(); // blur - return true; - } - else { - tabs.focusTab(tab); - return false; - } + tab = pane.activeTab; + return !tab; }); + tabs.focusTab(tab); } } else {