mike-jumper commented on a change in pull request #419: GUACAMOLE-302:
Incorrect password field focus
URL: https://github.com/apache/guacamole-client/pull/419#discussion_r296824715
##########
File path: guacamole/src/main/webapp/app/login/directives/login.js
##########
@@ -137,13 +137,15 @@ angular.module('login').directive('guacLogin', [function
guacLogin() {
$scope.remainingFields = fields.filter(function isRemaining(field)
{
return !(field.name in $scope.values);
});
-
+
// Set default values for all unset fields
angular.forEach($scope.remainingFields, function setDefault(field)
{
if (!$scope.enteredValues[field.name])
$scope.enteredValues[field.name] = '';
});
+ $scope.relevantField = getRelevantField();
Review comment:
Properties which will be set on the scope need to be documented, just as
functions, objects, etc. This is done through assigning an initial value to the
property earlier in the directive/controller and using that assignment as the
location for the property's JSDoc:
For example:
https://github.com/apache/guacamole-client/blob/829aac98c7c6b04140d97c17be7347039a93ef11/guacamole/src/main/webapp/app/login/directives/login.js#L74-L93
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services