Chrome Autofill covers Autocomplete for Google Maps API v3

后端 未结 21 1050
我在风中等你
我在风中等你 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:24

    You can try changing the type attribute of your input field to search instead of text.

    This will not allow the autofill suggestions to open up on that particular input field.

    change this to

    Have tested on chrome 83 and safari 13.0.1. Works fine for me.

    Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search

提交回复
热议问题