vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Bug Report][3.5.14] autocomplete="new-password" doesn't work well with chrome autofill when editing

Open baotx opened this issue 1 year ago • 5 comments

Environment

Vuetify Version: 3.5.14 Vue Version: 3.4.21 Browsers: Chrome 123.0.0.0 OS: Windows 10

Steps to reproduce

<VForm>
	<VTextField
		label="Password"
		name="password"
		autocomplete="new-password"
		type="password"
		v-model={form.password.value}
	/>
	<VTextField
		label="Confirm Password"
		name="confirmPassword"
		autocomplete="new-password"
		type="password"
		v-model={form.confirmPassword.value}
	/>
</VForm>

Expected Behavior

With the form above, after using google's password suggestion, editing the first password field would subsequently update the second field without jump to the second field.

Actual Behavior

Everytime we change the first field, focus jumps to the second one.

Reproduction Link

https://github.com/tongxuanbao/vue-project-example

Go to About route and check out the issue

baotx avatar Apr 08 '24 06:04 baotx

Does it do the same if you use <input> there instead?

KaelWD avatar Apr 08 '24 06:04 KaelWD

It's working fine with input. I'm on my phone so can't create a side by side example, but here's an example of input in codepen from my colleague @Maxim-Mazurok https://codepen.io/diegoleme/pen/qBpyvr

baotx avatar Apr 08 '24 07:04 baotx

I added a quick PR for maintainers to have a look, essentially focus event fired an extra time.

It has to something to do with the line in #19572. It worked as expected after removing it

baotx avatar Apr 09 '24 08:04 baotx

I have the same problem,

I use v-text-field, and the autocomplete for the new-password only works from time to time.

XStarlink avatar Apr 15 '24 13:04 XStarlink

We are also seeing issues with VTextField on password fields calling focus() too many times, specifically on Chrome mobile we are seeing a maximum call exceeded error from some sort of focus() recalling. We are not manually calling focus()

meganspaulding avatar Apr 18 '24 14:04 meganspaulding