[TextField] Safari scrolls to top on password field focus with "filled" and "standard" variants #44396
Labels
browser: Safari
bug 🐛
Something doesn't work
component: text field
This is the name of the generic UI component, not the React module!
Steps to reproduce
Link to live example: (required)
Screen.Recording.2024-11-12.at.12.14.52.PM.mov
Steps to Reproduce:
1. Go to the TextField demo page on MUI’s website.
2. Scroll to any TextField with type="password" and set to the “filled” or “standard” variant.
3. Click on the password field in Safari (on iOS 17 or macOS).
4. Observe that the page briefly scrolls to the top of the viewport as Safari displays the password suggestion prompt.
Current behavior
In Safari, when focusing on a TextField with type="password" in either the “filled” or “standard” variant, the page flashes to the top as Safari’s password suggestion prompt appears. This behavior does not occur with the “outlined” variant.
Expected behavior
The page should remain stable and not scroll when the password field is focused, regardless of the variant in use.
Context
This issue affects the usability of forms with password fields in Safari by causing unexpected scrolling behavior. The issue appears to be related to Safari’s password suggestion feature, affecting both mobile and desktop Safari users.
Your environment
npx @mui/envinfo
Search keywords: TextField password scroll Safari, TextField password field Safari bug, Safari scroll to top password field, MUI TextField password variant issue
The text was updated successfully, but these errors were encountered: