1

I'm trying to disable reminder of my password input field at my login screen. Here is my input field:

<r-input
        type="text"
        id="login_username"
        width="95%"
        v-model="formJson.username"
        labelColor="white"
        @keyup.enter="handleLogin"
      ></r-input>

I tried autocomplete=off, but it didn't work. Any suggestion?

riQQ
  • 9,878
  • 7
  • 49
  • 66
  • 1
    Does this answer your question? [Disabling Chrome Autofill](https://stackoverflow.com/questions/15738259/disabling-chrome-autofill) – Radu Diță Apr 17 '20 at 08:04
  • check this thread https://stackoverflow.com/questions/15738259/disabling-chrome-autofill – Radu Diță Apr 17 '20 at 08:05
  • Actually now ı can disable autofill my username input area with autocomplete="new-password" but when my input area type="password" it doesnt work as well, ı need disable autofill password input area as well – Murat Can Kağıtcı Apr 17 '20 at 08:35
  • 1
    I think you need to read the whole page, as there is a lot of discussion about how to disable autofill in chrome, and a link to a chrome issue that details reasons why people need to disable autofill, so that the issue can properly be resolved. That is to say, there is no guaranteed way to disable autofill at the moment. – Matt Ellen Apr 17 '20 at 10:09

6 Answers6

5

try this: vue-disable-autocomplete

How to use

import DisableAutocomplete from 'vue-disable-autocomplete';

Vue.use(DisableAutocomplete);

HTML attribute

<input type="email" name="email" autocomplete="off">
Wendel086
  • 69
  • 1
  • 5
3

You only need to put in the autocomplete parameter: nope

<input
  type="text"
  v-model="name"
  autocomplete="nope"/>
daniel ponce
  • 63
  • 1
  • 4
2

According to a similar question here on stackoverflow Disabling Chrome Autofill

Since Sept 2020: autocomplete="chrome-off" disables Chrome autofill.

Tunji Oyeniran
  • 3,948
  • 1
  • 18
  • 16
1

I know the subject is old, but it seems that with each update of Chrome, the problem comes back. I tried in several ways, including autocomplete="nope" and this.$refs.inputHoweverName.$el.setAttribute('autocomplete', 'nope');

Recently in Chrome version 87.0.4280.88, the only way I could, without having to install any plugin, using native javascript, was to create a dynamic id:

markup example

<v-text-field :id="dynamicID()" ... </v-text-field>

method example

dynamicID() { return 'dynamicID-' + Math.floor(Math.random() * Date.now().toString()); },

I do not know if it is the most elegant and efficient way, but for me it solved and that in many is enough.

Magno Alberto
  • 628
  • 14
  • 27
1

First, you have to install

npm install --save vue-disable-autocomplete

import this one

import DisableAutocomplete from '@aacassandra/vue-disable-autocomplete'; Vue.use(DisableAutocomplete);

for input...

for form...

Sedhu
  • 723
  • 1
  • 11
  • 36
hansi blog
  • 11
  • 1
0

autocomplete="off" will be ignored by most browsers. You can pass a string there to help the browser find the correct autocomplete. Example: autocomplete="email" To switch it off, pass something that the browser will not understand. Example: autocomplete="shut-up-google" will switch the autocomplete off.

pinki
  • 920
  • 1
  • 9
  • 8