Skip to content
This repository was archived by the owner on Jul 3, 2018. It is now read-only.

Pick the nearest element in the direction of scrolling#5

Open
frankier wants to merge 1 commit into
ckrack:developfrom
frankier:directional-nearest
Open

Pick the nearest element in the direction of scrolling#5
frankier wants to merge 1 commit into
ckrack:developfrom
frankier:directional-nearest

Conversation

@frankier
Copy link
Copy Markdown

I think this behaviour is best generally. When compared to Firefox's implementation, Firefox will always scroll to the next in the direction if you press a button on the scrollbar, but if you drag it will snap to the current nearest. In our case, we can't tell which happened, so I think going to the nearest in the direction of scrolling is a reasonable option.

@ckrack ckrack modified the milestone: v0.2.0 Feb 3, 2016
@ckrack
Copy link
Copy Markdown
Owner

ckrack commented Feb 4, 2016

While I agree with the behaviour, there is a bug that prevents one from scrolling back to the previous element, when using snap-coords.

Reproduce:
See demo/coordinates.html
Scroll to element 2
Scroll back to element 1
It snaps back to element 2

Expected: snap to element 1.

@frankier: do you want to fix it yourself?

@frankier
Copy link
Copy Markdown
Author

Hi, I'm probably not going to fix this since my fix works fine for my own purpose. Please just treat this PR as a bug report in that case. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants