Browser Autocomplete overlaps with MugShot's Autocomplete
Opened this issue · 6 comments
Unfortunately I believe it is super hard to make browser to not autocomplete inputs. We might randomize the form field name to avoid this?
autocomplete="new-password"
on the name field seems to help
@amenk I'm actually not able to reproduce this on my computer but I added a fix that, at a minimum, doesn't seem to break anything. The place where you enter the persons name is just an input box so I added a type of "text" and set the autocomplete field to false. That should prevent the browser from auto-completing the field in those text boxes.
Ah actually it looks like there was a "bug that's a feature" that my update broke. When there is only one name in the list of matches you can hit enter to auto-select that name. After making the above update the name no longer populated fully, it remained what you had typed it as. I corrected that by explicitly setting the name as the input field's value.
Which browser are you using? I think it only happens if you entered some names before in that input field and they are in the browser's autocomplete function. I am also not sure how to control this browser function. I am using Chrome 99 and it is super annoying. It's more a browser problem but makes usage of the plugin hard.
I also know that overriding the browser autocomplete can be super hard. We could move the plugin's autocomplete box at the top of the popup though... but first it needs to be reproduced properly.
I found this one:
https://superuser.com/questions/884029/see-all-autofill-data
So I have autofill data for the fields name_1
Name of the family member
which clashes with the suggestion by the plugin
There is this workaround: https://stackoverflow.com/a/29101636/288568
But it looks like autocomplete="off" should also work nowadays:
https://stackoverflow.com/questions/15738259/disabling-chrome-autofill
But:
For this to work be sure to have your input tag within a Form tag
which is currently in MugShot not the case