From f63abdf3dd58b43daeb30b15c502806af6e0ce4d Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Mon, 14 Nov 2016 02:05:50 -0300 Subject: [PATCH] Focus terminal when changing instances --- www/assets/app.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/www/assets/app.js b/www/assets/app.js index a4f6c1b..9cac73d 100644 --- a/www/assets/app.js +++ b/www/assets/app.js @@ -137,18 +137,17 @@ $scope.showInstance = function(instance) { $scope.selectedInstance = instance; if (!instance.creatingTerminal) { - instance.creatingTerminal = true; if (!instance.term) { $timeout(function() { createTerminal(instance); instance.term.focus(); }, 0, false); - } else { - $timeout(function() { - instance.term.focus(); - }, 0, false); + return } } + $timeout(function() { + instance.term.focus(); + }, 0, false); } $scope.removeInstance = function(name) {