1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-15 02:37:27 +08:00

Focus terminal when changing instances

This commit is contained in:
Marcos Lilljedahl 2016-11-14 02:05:50 -03:00
parent 46a186f28b
commit f63abdf3dd

View File

@ -137,18 +137,17 @@
$scope.showInstance = function(instance) { $scope.showInstance = function(instance) {
$scope.selectedInstance = instance; $scope.selectedInstance = instance;
if (!instance.creatingTerminal) { if (!instance.creatingTerminal) {
instance.creatingTerminal = true;
if (!instance.term) { if (!instance.term) {
$timeout(function() { $timeout(function() {
createTerminal(instance); createTerminal(instance);
instance.term.focus(); instance.term.focus();
}, 0, false); }, 0, false);
} else { return
$timeout(function() {
instance.term.focus();
}, 0, false);
} }
} }
$timeout(function() {
instance.term.focus();
}, 0, false);
} }
$scope.removeInstance = function(name) { $scope.removeInstance = function(name) {