10

I'm currently experiencing a very annoying problem with Google Chrome. I have some filters that are a multi-select and when I click to type on those filters, chrome suggests as an autofill option the placeholder for that select. I've never typed that text on this field, Chrome is getting that from the placeholder of the input.

Chrome autofilling with placeholder Gif

Also, it seems that Google saved that placeholder as a "suggestion" to fill data on forms. Chrome config

I've already tried to set those fields as autocomplete="off" and autocomplete="new-password and it did not work.

If I disable Chrome Option to autofill addresses, phone numbers and etc, this problem goes away.

I would like to be able to suppress chrome from suggesting this since it does not make any sense and makes using the filter a pain. I'm not sure if this is a chrome bug, a bug with select2, a combination of both. I've been looking everywhere on the internet to a solution and could not find one, does anybody know how to solve this?

2 Answers2

1

To turn off the auto suggestions which are displayed in chrome try adding

<input autocomplete="off">

Even after adding this if chrome tries to give you auto suggestion, the most widely used technique is to add an hidden input field above your field to solve this problem

<input style="display:none" type="password" name="pass"/>

Adding this above input must solve the problem

0

Try to add another select2 with display="none", visibility="hidden" and autocomplete="off" before that one and see if the problem goes away.

Had this issue with a password input a while ago and that did the trick.