iOS not autofilling password

I wrote about this a couple months ago and submitted a bug report. Is no one else experiencing this bug? I’m using the standard Bubble log in element and Apple no longer recognizes it to autofill the username and password, which is quite annoying for users that use auto-generated strong passwords

Hi @ramzizi!
Have you tried the options in this link: Auto-fill your information in Safari on your iPhone - Apple Support (US)

Yes, and Bubble support even acknowledges it as a repeatable problem on their end.

1 Like

Here’s a possible fix, essentially they are making all password fields autocomplete attribute as “new-password” it needs to be “current-password” to autofill.

Let’s try to override this with JS.

Do only when condition is true - page loaded fully is yes - run JavaScript.

Make sure you give the password field the html ID as “passfield”

Code

// Select the input element by its ID
const passwordInput = document.querySelector(‘#passfield’);

// Update the autocomplete attribute to “current-password”
if (passwordInput) {
passwordInput.setAttribute(‘autocomplete’, ‘current-password’);
}

@ramzizi

1 Like

@ramzizi

Just tested & confirmed the above works for autofilling on login.

1 Like

That’s awesome, I will try it out for myself soon!

This topic was automatically closed after 70 days. New replies are no longer allowed.