Skip to content

Fix backup key and filter field being autofilled as logins#1200

Open
ichthyosaurus wants to merge 1 commit into
element-hq:masterfrom
ichthyosaurus:fix-invalid-autofill
Open

Fix backup key and filter field being autofilled as logins#1200
ichthyosaurus wants to merge 1 commit into
element-hq:masterfrom
ichthyosaurus:fix-invalid-autofill

Conversation

@ichthyosaurus
Copy link
Copy Markdown

Firefox misinterprets the backup key field on the settings page and the room filter field as a pair of username-password login fields. It then autofills a username in the filter field each time the settings page is opened.

The only working fix is to mark both fields as "autocomplete: new-password" because Firefox ignores all other directives. I still added the proper attributes to both fields just in case the major browsers will decide to follow the spec one day.

The "readonly" hack is included for completeness. It may improve compatibility with older browsers where one of the other tricks fails.

The same fix is intended in #616 but I think my code is more semantically correct in this case. What's even more important, #616 doesn't fix the issue on my end using Firefox 132 and older.

Bug

Fixes #380.
Fixes hydrogen-sailfishos/harbour-hydrogen#41.

Firefox misinterprets the backup key field on the settings page
and the room filter field as a pair of username-password login
fields. It then autofills a username in the filter field each
time the settings page is opened.

The only working fix is to mark both fields as "autocomplete: new-password"
because Firefox ignores all other directives. I still added the proper
attributes to both fields just in case the major browsers will decide
to follow the spec one day.

The "readonly" hack is included for completeness. It may improve
compatibility with older browsers where one of the other tricks fails.

Signed-off-by: Mirian Margiani <mixosaurus+ichthyo@pm.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filtered room is filled with my username when I go back from the page Settings Chrome Autofills Security Key

1 participant