Login form and auto-filling password managers

I’m having trouble getting Livewire models to play nice with password managers that auto-fill both username and password.

The password managers fill out both username and password as expected. But there’s something about the timing or simulated events that cause Livewire to clear them out immediately after.

Depending on the browser/password manager combo, Livewire submits one or both fields with a null value as soon as the password manager pastes the data into the fields. The null fields then of course come back empty and get cleared on the screen.

Using wire:model.lazy resolved this for my desktop browsers (Firefox and Chrome with Bitwarden), but still left things broken for Safari on iPhone/iPad.

I ended up using this work-around for now: https://github.com/livewire/livewire/issues/313#issuecomment-542153237

While this work-around works fine, it eliminates most of the Livewire advantages, so I’m hoping for a different solution.

Has anyone else created a login form with Livewire?

I don’t know if this would work, or is even a solution to the problem, but have you tried making the login button not a submit button? If you do an a tag and style it like a button, the password manager might not auto submit it.

Had to try this, but unfortunately does not help.

The password manager does not automatically submit the form. It fills out the username, then the password, upon which livewire clears the username again.

I would create an issue on github if you haven’t already. Like you, I would’ve thought wire:model.lazy would be the fix, but I’ve never tested any livewire in mobile safari like you have. There’s only one other way I can think of to make it work in the current state of livewire aside from your current workaround you linked, but it’s the same issue of defeating the purpose of using livewire.

I give you props for sticking with it, I would’ve given up on it and just not used livewire for the login.