Chrome Autofill covers Autocomplete for Google Maps API v3

后端 未结 21 1048
我在风中等你
我在风中等你 2021-02-01 00:57

I am using Google Maps Javascript v3 to setup autocomplete on an HTML input field like so:

http://imgur.com/Rm6X2FI.png - (w/out autofill)

The issue I\'m having

21条回答
  •  一整个雨季
    2021-02-01 01:47

    This is driving me crazy, after testing lot of stuff, what I had to do to prevent this behavior is not giving a hint to chrome that's an address.

    Not an easy challenge to make it user friendly without mentioning the words "address", "street", etc

    I end up using the word "Location" in the placeholder. I didn't use any other attribute like autocomplete. Simply never mention anywhere it's an address, and Chrome will stop doing this.

    I hope this can help others.

提交回复
热议问题