Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable browser autosuggestion when jquery autocomplete is on?

When I type in an input box, my firefox browser automatically provide suggestions based on whatever I typed in this input box before. With jQuery Autocomplete enabled on this input box, before Autocomplete finish loading its suggestions, browser's suggestion comes first. How can I disable the browser suggestion?

like image 437
Jenny Avatar asked Jul 12 '12 03:07

Jenny


People also ask

How do I stop autofill in Chrome using jquery?

Autofill can be disabled with autocomplete="false".

How do I turn off input field suggestions?

Use the <input> tag with autocomplete attribute. Set the autocomplete attribute to value “off”.

How do I turn off autocomplete on password field?

Preventing autofilling with autocomplete="new-password" If you are defining a user management page where a user can specify a new password for another person, and therefore you want to prevent autofilling of password fields, you can use autocomplete="new-password" .


2 Answers

All you have to do is specify autocomplete="off"

<input type="text" value="" id="searchBox" autocomplete="off">
like image 192
iamkrillin Avatar answered Sep 30 '22 21:09

iamkrillin


JQuery Autocomplete automatically adds autocomplete=off, you don't need to do this yourself.

Are you using a browser extenstion that overrides autocomplete=off? If so, it will override this.

like image 42
Barmar Avatar answered Sep 30 '22 20:09

Barmar