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_r296883020
##########
File path: guacamole/src/main/webapp/app/login/directives/login.js
##########
@@ -188,17 +197,37 @@ angular.module('login').directive('guacLogin', [function
guacLogin() {
// Clear all remaining fields that are not username fields
angular.forEach($scope.remainingFields, function
clearEnteredValueIfPassword(field) {
-
+
// If field is not username field, delete it.
if (field.type !== Field.Type.USERNAME && field.name
in $scope.enteredValues)
delete $scope.enteredValues[field.name];
-
+
});
+
}
}));
};
+
+ /**
+ * Returns the field most relevant to the user given the current state
+ * of the login process. This will normally be the first empty field.
+ *
+ * @return {Field}
+ * A field most relevant, null if no relevant field exist.
Review comment:
> A field most relevant
Do you mean "the field most relevant?"
> null if no relevant field exist.
Is this the case? My reading of the logic is that it will return null if all
fields appear equally relevant (ie: there is no single "most relevant" field),
not necessarily that are absolutely no relevant fields whatsoever. In fact, for
the login process, it's more likely that all fields are relevant; it's a
question of degrees.
----------------------------------------------------------------
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