LoginSignup
5
2

More than 1 year has passed since last update.

autoComplete='off' がGoogleChromeで効かない

Last updated at Posted at 2022-04-26

オートコンプリートを無効にする方法

通常、こう書きますが

  <input
    autoComplete='off' // reactで書いてるのでキャメルケースです
  />

なぜかchromeだとこれでもオートコンプリートが出てきます。
そして色々ググった結果、、、

  <input
    autoComplete='new-off' // 色々試したけどnew-offとかnew-xxxならOKだった
  />

や、

  <input
    autoComplete='none'
  />

と書くとchromeでのオートコンプリートが無効にできることを知りました。
このnewとかnoneがgoogleChrome内でどう認識され処理されているかは不明。。。

参考:https://stackoverflow.com/questions/37503656/react-doesnt-render-autocomplete-off

5
2
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2