gumshoe icon indicating copy to clipboard operation
gumshoe copied to clipboard

isAtBottom isn't always correct on High DPI screens

Open pradyunsg opened this issue 3 years ago • 2 comments

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 avatar Jul 14 '20 11:07 pradyunsg

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

I made a GIF!

pradyunsg avatar Jul 14 '20 11:07 pradyunsg

Gentle nudge.

pradyunsg avatar Aug 07 '20 04:08 pradyunsg