-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typeahead: autocomplete="off" no longer prevents autocomplete in Chrome #2194
Comments
I tried adding Suggestion: Add a That or set it to a random value like One of the SO posts suggested setting to I've also tried changing the name of my input to something other than |
Same case here. |
The autocomplete attribute is now configurable in the typeahead Fixes ng-bootstrap#2194
The autocomplete attribute is now configurable in the typeahead Fixes ng-bootstrap#2194
The autocomplete attribute is now configurable in the typeahead Fixes ng-bootstrap#2194
The autocomplete attribute is now configurable in the typeahead Fixes ng-bootstrap#2194
The autocomplete attribute is now configurable in the typeahead Fixes ng-bootstrap#2194
The autocomplete attribute is now configurable in the typeahead Fixes ng-bootstrap#2194
The autocomplete attribute is now configurable in the typeahead Fixes ng-bootstrap#2194
Maybe assigning an invalid value to autocomplete attribute could help:
Source: MDN web docs |
Bug description:
Chrome shows its autocomplete suggestions when I start typing. These suggestions cover up the ngbTypeahead UI, making it virtually unusable when Chrome shows its suggestions:
It also makes it possible to input a value that's not in the list of allowed options defined by one's typeahead component, which is also not desirable. Worse still, if you select an option from Chrome's autocomplete, then it doesn't trigger the needed events and doesn't end up updating the bound model (model still says undefined)!
#520 added
autocomplete="off"
to host, which was supposed to prevent this (and undoubtedly did until recently), but recent Chrome versions ignore this, much to the frustration of developers that depended on that behavior. See for example:Link to minimally-working plunker that reproduces the issue:
I tried but could not reproduce in a plunker. I'm not sure what the difference is in the plunker, or how to reproduce it there, but maybe someone else will know the answer.
Note that to reproduce you probably need to actually submit the form with some values so that it remembers them. I added
ngNoForm
in order to allow submitting the form, and tried this, but I can't get the autocomplete suggestions to show up in the plunker unless I remove the[ngbTypeahead]
.Version of Angular, ng-bootstrap, and Bootstrap:
Angular: 5.2.6
ng-bootstrap: 1.0.0
Bootstrap: 4
Chromium: 64.0.3282.140 (Official Build)
The text was updated successfully, but these errors were encountered: