[PM-595] Autofill doesn't work for logins without passwords #5325
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of change
Objective
An issue was identified where a user is unable to enact the autofill process when a login item does not contain a password. Currently we guard against autofilling the user name of an item when the password is not set by returning early from the
AutofillService.generateLoginFillScript()
method.I'm not entirely sure why we do this, as attempting to do an autofill for a login item that does not have a username set, but has a password set, works correctly. Removing the early return from
AutofillService.generateLoginFillScript()
allows the username from the password-less login item to be autofilled as expected. In testing this behavior, I'm not noticing any significant side-effects or concerns with allowing this to function in such a manner.Code changes
AutofillService.generateLoginFillScript()
that triggers when a passwordless login entry attempts to autofill. This allows the autofill for a passwordless login item to behave in the same manner as an item that contains a password, but not a user name.Screenshots
Screen.Recording.2023-05-01.at.11.51.07.AM.mov
Before you submit