Automatically focus the first client if no client has yet been focused.
@@ -232,7 +232,8 @@ angular.module('client').factory('guacClientManager', ['$injector',
clients.push(service.getManagedClient(id));
});
- if (clients.length === 1) {
+ // Focus the first client if there are no clients focused
+ if (clients.length >= 1 && _.findIndex(clients, client => client.clientProperties.focused) === -1) {
clients[0].clientProperties.focused = true;
}
