Skip to content

Commit fc5cdb9

Browse files
committed
Updated the autocomplete attribute to match the spec.
1 parent 174df1c commit fc5cdb9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/jquery.autocomplete.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,7 @@
163163
options = that.options,
164164
container;
165165

166-
// Remove autocomplete attribute to prevent native suggestions:
167-
// as per
168-
// https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion
169-
// some browsers e.g. Google Chrome ignore autocomplete=off but autocomplete=nope
170-
// will provide the correct behaviour
171-
that.element.setAttribute('autocomplete', 'nope');
166+
that.element.setAttribute('autocomplete', 'off');
172167

173168
// html() deals with many types: htmlString or Element or Array or jQuery
174169
that.noSuggestionsContainer = $('<div class="autocomplete-no-suggestion"></div>')

0 commit comments

Comments
 (0)