How to Turn Off Autofill Feature for Passwords in Vue Using Google

How can I disable the password reminder in my login screen input field? This is what my input field looks like:

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

I attempted to use autocomplete=off, but it didn't have any effect. Any suggestions on how to achieve this?

Answer №1

Check out this handy tool: vue-disable-autocomplete

Instructions for usage:

import DisableAutocomplete from 'vue-disable-autocomplete';

Vue.use(DisableAutocomplete);

Using the HTML attribute

<input type="email" name="email" autocomplete="off">

Answer №2

All you have to do is include the autocomplete attribute and set it to "nope"

<input
  type="text"
  v-model="name"
  autocomplete="nope"/>

Answer №3

I came across a question on stackoverflow that discussed the topic of disabling Chrome Autofill, you can check it out here

Starting from September 2020, using

autocomplete="chrome-off"
will effectively disable Chrome autofill.

Answer №4

Even though the topic may be considered old, it appears that with every Chrome update, the issue resurfaces. I have attempted various methods, such as using autocomplete="nope" and

this.$refs.inputHoweverName.$el.setAttribute('autocomplete', 'nope');

In the most recent Chrome version 87.0.4280.88, the only solution I found without needing to install any plugins was by utilizing native JavaScript to create a dynamic id:

Example of HTML markup

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

Example of method

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

While this may not be the most elegant or efficient method, it resolved the issue for me which is sufficient in many cases.

Answer №5

To get started, the first step is to download

npm install --save vue-disable-autocomplete

Then include this in your code

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

Use it for input fields...

And for forms...

Answer №6

Setting autocomplete to "off" may not work with all browsers. Instead, try providing a specific string to help the browser with auto-completion. For example, you can use autocomplete="email". To completely disable it, provide a random string that the browser won't recognize. For instance, autocomplete="shut-up-google" will effectively turn off auto-completion.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Avoid the rendering of child elements in React

How can I skip rendering children in React? I want to enclose existing DOM nodes on a page within a React component. I need to render the frame only, excluding the static content which already exists as pre-existing DOM nodes. Is there a way to achieve t ...

Having an issue with ng-model not functioning correctly in md-menu with AngularJS material

I'm currently using md-menu from Angular Material and I have integrated a search box with ng-model in the list. However, I am facing an issue where I cannot access ng-model because 'md-menu-content' is out of scope. Here is my code: <div ...

Color the faces of Three.js objects using the vertex colors provided

I am working with a mesh and have assigned vertex colors using the following code: var vertColors = MyPolygonProto.polygons[iBorderCounter].polyMesh.geometry.colors; vertColors[vertCount] = new THREE.Color(finalColor.r, finalColor.g, finalColor.b); The p ...

How to Create an Interactive JavaScript Drop Down List for Displaying and Concealing Divs

Looking for some assistance in combining a chained drop-down list with the functionality to show/hide a specific div based on selection. I've come across solutions for each separately, but struggling to merge the JavaScript code (not my strong suit as ...

Is there a way to display a PHP error message while submitting the form asynchronously?

Utilizing phpMailer in combination with AJAX to send emails. The objective is to send the email and then showcase any error messages from submit.php on contact.php Currently, every submission displays "Message sent" even if it was not actually sent. Con ...

Height-adjustable Rows

I recently encountered a challenge while designing a layout for user reviews in one of my projects. Each review varies in length, leading to irregular row lengths with different div element sizes. My goal is to create rows with 3 divs each and have the sub ...

The jQuery change function appears to be functioning properly, but it is not producing any results

I am facing an issue with my jQuery code that rebuilds a dropdownlist based on the radio buttons selected. Although the code seems correct and the method works properly, the dropdownlist items do not update as expected. Can anyone provide some insight or i ...

How can I make changes to a JavaScript code on the browser while debugging?

In my application, I heavily rely on ext.js for all UI development tasks. I am now curious to find out if there is a way to modify JavaScript code directly in the browser while debugging. This would not only help me avoid frequent deployments but also sp ...

"Clicking on the hamburger menu causes the webpage to reset its scroll

I recently integrated a mobile hamburger menu into my website, which is primarily built around a single page. However, I noticed that whenever I open the menu, it automatically scrolls to the top of the page regardless of where you were previously scrollin ...

Utilizing ScrollView Component in React Native

I have developed a simple app that displays a collection of images with titles, resembling a film gallery where all available films can be viewed. However, I encountered an issue when trying to implement the ScrollView element as it does not allow for scro ...

Having trouble with updating data in MongoDB using Node.js

I am currently in the process of developing a multiplayer game, complete with a login system. I've encountered some issues when trying to update the user ratings using db.collection.update(). Strangely, whenever I input the username of a player, it re ...

The header and sub-navigation are in disarray and require some help

Dear web experts, After six months of learning to code websites, I'm tackling a big project with some challenges. The recent changes to the header and subnav have thrown everything off balance, making it look wonky and not quite right. Specifically, ...

Utilizing jQuery AJAX to enable a functional back button feature upon modifying HTML

While there are numerous inquiries regarding jQuery and Back button issues, the focal point is typically on maintaining history features when using the browser back/forward buttons. One specific query I have is how to load an AJAX-affected HTML page when ...

Creating asynchronous JavaScript constructors using a static method called "create" presents challenges when dealing with TypeScript types

I've been diving into the world of asynchronous constructors and have successfully implemented them in JavaScript. However, I'm facing a challenge with TypeScript types. Here's how it should ideally work: const a: AnyClass = await AnyClass. ...

Guide to interpreting cell values from a dropdown select option within a datatable

I've been having an issue with a jQuery function that reads and returns data from a jQuery datatable. It all works fine for cell values, but when it comes to drop-downs, it returns the entire option list instead of just the selected value in the last ...

Error encountered when auto-generating IDs in Next.js with Firebase Firestore database

Hello, I am trying to access the details of my page in Next.js and retrieve data from a Firestore database. Here is the error message I am encountering: Firebase initialized successfully page.js:32 router.query: undefined page.js:34 Movie ID: undefined p ...

What is the process for installing a third-party library in React Native without using npm or yarn?

Is there a way for me to install a third-party library manually without affecting the build run or performance of my project? I am looking to add this specific library: https://github.com/asmadsen/react-native-unity-view ...

Puppeteer does not support the use of multiple proxies concurrently

How can I effectively set up multiple proxies with puppeteer? Here is the approach I have taken: const puppeteer = require('puppeteer'); (async () => { let browsers = []; const proxies = [ 'socks5://myuser: ...

Horizontal rule located within a table but spanning the entire width

I wrote the following code: <table> {item.awards.map((obj,i) => <tbody> <tr> <td>Name</td> <td>:</td> <td>{obj.title}</td> </tr> ...

Error in jQuery syntax when parsing a correctly formatted JSON object

My goal is to retrieve Instagram user details using jQuery ajax, which can be found at the following URL: https://www.instagram.com/instagram/?__a=1 However, when I try to make the Ajax call with the code below: $(document).ready(function(){ var instag ...