Skip to content
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

fix: Control ComboBox scroll with scrollTop instead of scrollIntoView #1715

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

suzubara
Copy link
Contributor

@suzubara suzubara commented Oct 25, 2021

Summary

This PR modifies how the ComboBox component scrolls to a focused option when opening the list to use the scrollTop property of the list element instead of scrollIntoView. This fixes an issue where the whole page would jump when opening the combo box if it was scrolled down (#1693).

Related Issues or PRs

Fixes #1693

How To Test

  • Verify the ComboBox list scrolls to the appropriate position when opening (focused/selected option should be in view)
  • Verify the page doesn't jump if opening the ComboBox when the page is scrolled down

Screenshots (optional)

Fixed in my application:

scrollFixed

@suzubara suzubara added high priority Active blocker for a current project or just urgent type: bug Something isn't working like it's supposed to labels Oct 25, 2021
@suzubara suzubara merged commit 600d53b into main Oct 25, 2021
@suzubara suzubara deleted the sr-1693-combobox-scroll branch October 25, 2021 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority Active blocker for a current project or just urgent type: bug Something isn't working like it's supposed to
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] ComboBox scroll behavior
3 participants