iOS credit card autofill persists on drop down inputs

时光毁灭记忆、已成空白 提交于 2020-01-23 13:49:14

问题


I have come across a bug on a website I am working on with the credit card autofill iOS offers. I cannot offer a working example of this is as it requires a genuine SSL certificate in order for the autofill to appear on an iOS keyboard however I can actually get this to occur on Amazon's checkout too.

In essence the issue is that after having been offered to autofill having focused on any credit card enabled input it looks like all drop down input keyboards will also offer to autofill your credit card.

This happens even after a page refresh and even across different domains. All dropdowns will have autofill credit card up until a non credit card plain text input has been focused on.

Below is a simplified version of the problem:

<input id="cardNumber"/> <!-- <-- Activates autofill -->
<select id="normalSelect">
    <option>1</option>
    <option>2</option>
    <option>2</option>
</select>
<input id="normalInput"/>
  1. Touch #cardNumber and be offered to autofill on the keyboard
  2. Touch #normalSelect (or any non-credit card drop down) and still be offered to autofill incorrectly

(You can optionally refresh the site at this point or even navigate to another domain with non credit card enabling drop downs and try them to see if they offer autofill incorrectly too. It doesn't even have to be a domain on https).

  1. Touch #normalInput (or any plain non credit-card text input) and the autofill is not visible as desired
  2. Touch #normalSelect (or any non-credit card drop down on any) again and now autofill has gone

My question is, is there anything I can do (maybe apply something to select drop downs) to make sure it never offers credit card autofill?

Is this a known iOS bug?

I am using an iPhone6 iOS 8.1.2 Safari.

EDITS

  1. Textareas also have this issue.
  2. Adding autocomplete="off" does not prevent it.

来源:https://stackoverflow.com/questions/30599381/ios-credit-card-autofill-persists-on-drop-down-inputs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!