Disabling Safari autofill on usernames and passwords

后端 未结 17 1742
萌比男神i
萌比男神i 2020-11-29 03:52

You might already know, that Safari has a nasty autofill bug where it fills email, username and password fields no matter if you set autocomplete=\"off\" or not

17条回答
  •  暖寄归人
    2020-11-29 04:31

    Adding the css to the input will hide the safari button pseudo-element and users will not be able to use autocomplete

    input::-webkit-contacts-auto-fill-button, 
    input::-webkit-credentials-auto-fill-button {
      visibility: hidden;
      pointer-events: none;
      position: absolute;
      right: 0;
    }

提交回复
热议问题