2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-12-22 10:58:55 +00:00

Updated the autocomplete attribute to match the spec.

This commit is contained in:
Pieter Bogaerts 2018-07-09 16:44:55 +02:00
parent 174df1c93a
commit fc5cdb93b8

View File

@ -163,12 +163,7 @@
options = that.options,
container;
// Remove autocomplete attribute to prevent native suggestions:
// 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');
that.element.setAttribute('autocomplete', 'off');
// html() deals with many types: htmlString or Element or Array or jQuery
that.noSuggestionsContainer = $('<div class="autocomplete-no-suggestion"></div>')