11

Github Safari tries to fill username · Issue #25 · livewire-ui/spotlight · GitHu...

 2 years ago
source link: https://github.com/livewire-ui/spotlight/issues/25
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Author

quarterdeck commented 5 hours ago

edited

Upon further investigation this seems like an absolutely crazy Safari bug and I'm not sure if it can be worked around or not.

I noticed that this was only happening on one page of our app. So I systematically commented out each section of HTML to see if any block was affecting it and I found one!

I narrowed it down to a single <p> tag which contained the text "Welcome back,". I thought the comma might be causing an issue (no idea why) so I removed it. No change.

I thought the word "back" might be making Safari think this was a login page for some reason? So I removed it and it fixed the issue! Crazy.

Out of curiosity I tried removing "Welcome" and adding "back" back in. Still didn't re-occur. ?!

So it seems only the combination of words "welcome back" causes this to happen. Absolutely no idea why. To confirm I chose another page randomly and put the phrase "welcome back" in a random position on the page and low and behold it caused this to happen again.

For some reason the presence of these words on the page is adding the following to the Shadow DOM of the input field:

<div pseudo="-webkit-credentials-auto-fill-button" role="button" aria-label="password AutoFill" style="display: none !important;"></div>

Easily the most bizarre bug I've ever come across.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK