From d6c5165f90b6ac105ce930d43a76fe619c07dca6 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 4 Jul 2021 20:34:35 -0700 Subject: [PATCH] GUACAMOLE-724: Update connection parameters in menu after focus changes. --- .../src/app/client/controllers/clientController.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js index 980d71b3c..12899b7ea 100644 --- a/guacamole/src/main/frontend/src/app/client/controllers/clientController.js +++ b/guacamole/src/main/frontend/src/app/client/controllers/clientController.js @@ -452,8 +452,9 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams // Update client state/behavior as visibility of the Guacamole menu changes $scope.$watch('menu.shown', function menuVisibilityChanged(menuShown, menuShownPreviousState) { - // Update available connection parameters, if there is a focused - // client + // Re-update available connection parameters, if there is a focused + // client (parameter information may not have been available at the + // time focus changed) if (menuShown) $scope.menu.connectionParameters = $scope.focusedClient ? ManagedClient.getArgumentModel($scope.focusedClient) : {}; @@ -474,6 +475,11 @@ angular.module('client').controller('clientController', ['$scope', '$routeParams if (oldFocusedClient) $scope.applyParameterChanges(oldFocusedClient); + // Update available connection parameters, if there is a focused + // client + $scope.menu.connectionParameters = newFocusedClient ? + ManagedClient.getArgumentModel(newFocusedClient) : {}; + }); // Update page icon when thumbnail changes