GUACAMOLE-724: Automatically focus the first client if no client has yet been focused.

This commit is contained in:
Michael Jumper
2021-06-16 21:59:34 -07:00
parent d0b1fb7d7f
commit 63452b7bc8

View File

@@ -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;
}