2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-09 14:50:57 +00:00

Merge pull request #724 from PizzaPete/master

Set native input autocomplete off.
This commit is contained in:
Tomas Kirda 2018-07-09 11:59:32 -05:00 committed by GitHub
commit 0765368294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,12 +163,7 @@
options = that.options, options = that.options,
container; container;
// Remove autocomplete attribute to prevent native suggestions: that.element.setAttribute('autocomplete', 'off');
// as per
// https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
// some browsers e.g. Google Chrome ignore autocomplete=off but autocomplete=nope
// will provide the correct behaviour
that.element.setAttribute('autocomplete', 'nope');
// html() deals with many types: htmlString or Element or Array or jQuery // html() deals with many types: htmlString or Element or Array or jQuery
that.noSuggestionsContainer = $('<div class="autocomplete-no-suggestion"></div>') that.noSuggestionsContainer = $('<div class="autocomplete-no-suggestion"></div>')