lekoala / bootstrap5-autocomplete

Autocomplete for Bootstrap 5 (and 4!)
MIT License
87 stars 16 forks source link

Browser native autocomplete dialog showing up sometimes #23

Closed AgentSmith0 closed 1 year ago

AgentSmith0 commented 1 year ago

Since the target input doesn't have autocomplete="off" set, because it overrides this attribute somehow, two autocomplete menus are showing up, which is not really wanted. Maybe an option to set autocomplete="off" could fix this issue.

lekoala commented 1 year ago

autocomplete off doesn't work in most situation this is why i'm using a random string for it

lekoala commented 1 year ago

do you have an example and a given browser that show this issue?

AgentSmith0 commented 1 year ago

This is the default behavior in every browser: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#disabling_autocompletion, https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values And it works in all of my tested browsers (Webkit, Chromium, Firefox).

lekoala commented 1 year ago

mhh that's odd, i was using "off" before but sometimes it was ignored by the browser. but it seems my method doesn't work any better so maybe better to stick with off. you can check on master

AgentSmith0 commented 1 year ago

Works fine now, thanks!

lekoala commented 1 year ago

@AgentSmith0 fyi i added a new option (the original reason why i didn't use autocomplete="off") for fields like city/addresses where browser native autocompletion may show up https://github.com/lekoala/bootstrap5-autocomplete/releases/tag/1.1.20