-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Autocomplete] List scrolls to the top when new data is added (only on mobile) #36212
Comments
Thanks, I was able to reproduce it. Would you like to contribute to the project by investigating it? |
I looked at it and here's what's going on: current logic checks whether any previous option was highlighted when new options are added - if not, the scroll position is reset. On touch devices options are not highlighted when scrolling, unless you press them - that's the problem. In this PR there is a discussion about that logic: |
@michaldudak i identified the bug i will make a PR soon 😉 |
Created a PR check it out guys #36231 |
Thank You for the fix @SaidMarar, as for me, it looks great. |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
https://codesandbox.io/embed/mui-autocomplete-bug-bjlczv
Steps:
Current behavior 😯
On mobile list scrolls to the top when new data is added
Expected behavior 🤔
Scroll position should stay the same
Context 🔦
I found an issue that intended to resolve this bug and it did, but only on desktop, mobile is still broken:
#29508
Your environment 🌎
The text was updated successfully, but these errors were encountered: