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

Bug when scroll position at the end #199

Open
Nes-si opened this issue Nov 16, 2017 · 6 comments
Open

Bug when scroll position at the end #199

Nes-si opened this issue Nov 16, 2017 · 6 comments
Labels

Comments

@Nes-si
Copy link

Nes-si commented Nov 16, 2017

Hi.
I have a problem with animation of remove when a container scrolling position is at the end (or near the end). In this case the animated element shifts down by its height.
I can illustrate it by screencasts.
Normal case: scrolling position is higher than end
Wrong case: scrolling position is at the end

@joshwcomeau
Copy link
Owner

Ah, thanks for opening the issue - the screen casts are super helpful!

I suspect this will be a tricky one to solve, though :(. It seems like the browser's default behavior of sticking to the bottom of the scroll position will be tough to work around.

As a hacky bandaid fix, you could maybe offset the user's scroll position by 1px before the animation starts, using onStartAll?

@Nes-si
Copy link
Author

Nes-si commented Dec 5, 2017

It's not a solution. If the scroll position is near the end, the bug still exists with offset = elementHeight – (endPos – scrollPos) . So when scrollPos == endPos, the offset is maximal, like on screencast. And when (endPos – scrollPos) ≥ elementHeight, the problem disappears.
I afraid it's a little bit complicated, sorry.

@yanhsu
Copy link

yanhsu commented Feb 1, 2018

hello ,
i have same problem.
but i don't know how to resolve this problem.
do u have any suggestion to resolve this problem?
thanks.

@joshwcomeau
Copy link
Owner

Yeah, it's tricky. I haven't had the chance to dig into this yet.

I wonder if setting maintainContainerHeight={true} would fix it? That prop was added for a totally different reason, but it might help?

@yanhsu
Copy link

yanhsu commented Feb 1, 2018

i had tried to add prop maintainContainerHeight={true} but still not resolve it.
i made a video to express this problem.
https://www.youtube.com/watch?v=uXkN2w3QNZ8&feature=youtu.be

@joshwcomeau
Copy link
Owner

Huh, that's even stranger.

This seems like an issue that should be prioritized, but I'm currently juggling too many side-projects. So I'm afraid I can't guarantee it'll get fixed anytime soon =(.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants