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

browser(webkit): change scrollIntoView to only scroll if needed #5079

Merged
merged 1 commit into from Jan 21, 2021
Merged

browser(webkit): change scrollIntoView to only scroll if needed #5079

merged 1 commit into from Jan 21, 2021

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Jan 21, 2021

We used to have alignCenterAlways to workaround the RenderLayer logic
that does not scroll horizontally if enough of the element is visible.

This change plumbs the bit "avoid minimum threshold" in the
ScrollAlignment. This way, we don't actually scroll when the desired
rect is already visible and prevent overlay scrollbars flashing that
block pointer actions on MacOS.

We used to have alignCenterAlways to workaround the RenderLayer logic
that does not scroll horizontally if enough of the element is visible.

This change plumbs the bit "avoid minimum threshold" in the
ScrollAlignment. This way, we don't actually scroll when the desired
rect is already visible and prevent overlay scrollbars flashing that
block pointer actions on MacOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants