What is making the password autofill bar show above the keyboard in Android Chrome? [duplicate]
Asked Answered
Y

2

7

About a week ago I noticed that Android Chrome was showing a password autofill bar above the keyboard in my app (Parchment). The HTML for the <input> is the following, which is definitely not a password input:

<input aria-hidden="false" autocapitalize="off" class="Input LineInput" type="text" maxlength="120">

Does anyone know what would make Chrome think that the password autofill bar should be displayed, and what can be done to stop it happening?

Screenshot from Parchment in Android Chrome showing the password autofill bar

Yecies answered 29/7, 2022 at 1:19 Comment(4)
I might be saying the obvious, but have you tried setting autocomplete to false? developer.mozilla.org/en-US/docs/Web/Security/…Fruge
@MauriceLam Setting autocomplete="off" doesn't seem to make any difference unfortunately.Yecies
is the input inside of a form?Matchmaker
@Matchmaker No it's just a stand alone input box.Yecies
S
4

This problem exists for a whole range of input types. I tested and confirmed it's an issue for type="text", type="number", type="password", type="tel", type="url", type="email"

The only type not affected is type="search"

Depending on your application, it may or may not be possible to switch to a search input. For me, it made sense as it was a search of sorts.

I've given a more detailed response on this related SO question

Strouse answered 24/8, 2022 at 0:56 Comment(0)
M
-1

If the input is inside of the form, put and attr on the form that is autocomplete="off", then make a hidden input as the first child of that form, with also autocomplete="off" If it doesn't work, then try doing autocomplete="chrome-off"

Matchmaker answered 5/8, 2022 at 19:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.