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

isAtBottom isn't always correct on High DPI screens #116

Open
pradyunsg opened this issue Jul 14, 2020 · 2 comments
Open

isAtBottom isn't always correct on High DPI screens #116

pradyunsg opened this issue Jul 14, 2020 · 2 comments

Comments

@pradyunsg
Copy link

pradyunsg commented Jul 14, 2020

Screenshot 2020-07-14 at 4 50 58 PM

Figured this out while diagnosing why my sidebar wasn't switching to the lowest item when scrolling to the bottom. According to MDN, pageYOffset is:

A floating-point number specifying the number of pixels the Document is scrolled vertically within its containing Window. This number is subpixel precise, so it may not be an integer.

Looks like my page ends on a subpixel? :)

(sorry -- I didn't make a JSFiddle -- it would've taken more time than contributing a fix!)

@pradyunsg
Copy link
Author

This is a very WIP page, but hey, here's a GIF demoing the issue:

I made a GIF!

pradyunsg added a commit to pradyun/materialism that referenced this issue Jul 14, 2020
@pradyunsg
Copy link
Author

Gentle nudge.

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 a pull request may close this issue.

1 participant