Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safari: Conflict between custom auto complete and system contact autofill

We have a webpage which contains a text <input> to which we attach a custom auto complete component (using AngularStrap's Typeahead to be precise).

Safari obviously thinks, that the input contains a person's name and thus provides an autofill menu with values populated from the system's address book (the small menu on top in the screenshot; also notice the corresponding icon added by Safari, circled in green).

screenshot-autofill

This leads to the following problems:

  1. The field is titled "Name", but it is not meant to contain person names. So it makes no sense to provide person suggestions.

  2. Safari's built-in menu obscures our custom suggestion menu, shown in the screenshot below Safari's suggestions.

I tried the following to get rid of the Safari suggestions:

  1. Change the name and id attributes from "name" to something like "title" or "GoToHellSafari". Does not help.

  2. Add autocomplete="off", add autocomplete="false". Does not help.

  3. Change the actual text within the <label> to something besides "Name", such as "Title". This works, the autofill is gone.

  4. Cut the id-based connection between the <input> and its <label> by removing the id and name attributes. Does not help.

While option (3) looks promising, I have the following obvious issue: I want that label to read "Name". Any suggestions?

like image 844
qqilihq Avatar asked Oct 17 '16 12:10

qqilihq


People also ask

How do I change my AutoFill on Safari?

At the top right, tap the More button (three dots), select Settings. Tap Autofill and Payments. Tap either Address and more or Payment Methods. Edit both Address and more or Payment Methods to reflect your new name and information.

How do I delete AutoFill contacts from Safari?

Safari & iOS To turn off Safari autofill: Open Safari and select Safari on the top left-hand side of the screen. Click Preferences and then the AutoFill tab. Uncheck the box next to user names and passwords.

How do I change AutoFill settings?

Settings. Tap Autofill and payments. Tap Payment methods or Addresses and more. To stop saving payment info, turn off Save and fill payment methods.

How do I save addresses in Safari?

Go to Settings > Safari > AutoFill. Do any of the following: Set up contact info: Turn on Use Contact Info, tap My Info, then choose your contact card. The contact information from that card is entered when you tap AutoFill on webpages in Safari.


1 Answers

This user had a good solution, where you hide the autofill button completely: https://stackoverflow.com/a/39885072/20526

like image 181
Anton Avatar answered Nov 03 '22 21:11

Anton