Moonchild wrote: ↑2024-06-24, 10:32
The second change makes sense but I'm not sure about the first. It's poorly documented what "isSubmission" actually indicates or what the resulting behaviour is when it's just set to "false"
As far as I understand, the _getFormFields() function is used in two cases:
- when submitting a form, to prompt the user to save the entered credentials.
- when loading the page, to prompt the user to fill out the form automatically (using previously saved data).
In the first case (when submitting a form), isSubmission = true and _getPasswordFields(form , isSubmission) will skip the password field if it is not filled.
However, in the case of a specific site (
https://account.booking.com/sign-in), logging in is performed in two stages. At the first stage, the user must enter only the name, the password field is hidden and left blank. After entering the name, the form is submitted and is ignored by the password manager for the reason stated above. If we make the specified correction, then the password manager does not ignore the form, a window opens asking you to remember the username and an empty password, but the password can be edited directly in this window. This allows the user to save credentials.
I understand that this is a very special case; most sites do not make the login procedure using two separate forms for username and password (although I did not collect statistics and maybe it is now fashionable to do so?). Therefore, I do not presume to say that this correction is necessary.
Thanks.