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

Use overflow-anchor as a better fix for scrolling behaviour #48

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

DanTup
Copy link
Contributor

@DanTup DanTup commented Oct 8, 2018

Some browsers (Chrome definitely) try to stop the visible portion of the page moving when there are DOM changes above/below. This messed with our virtual table because while we were resizing the padding row at the top, it would scroll down by the same amount. I couldn't find a way to disable it so I put a hack in (keep track of the scrollTop and re-set it afterwards). This worked, but it actually messed with the programatic smooth scrolling because we'd end up re-setting it during the animation and the browser would then leave it as-is (so a long smooth scroll would stop after only a few pixels).

Turns out, there is a proper way to disable it, so this removes our hack and uses that.

Our hack for this caused issues when programatically setting the offset with a smooth scroll. This is the corect fix!
Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DanTup DanTup merged commit d05802e into flutter:master Oct 8, 2018
@DanTup DanTup deleted the overflow-anchor branch October 8, 2018 17:26
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.

2 participants