Properties such as scrollTop
or scrollLeft
, as well as many other "old" (dhtml) properties now to-be-standardized in the CSSOM View module, still return integer rather than double (as specified in the draft) in high dpi devices.
For example on such devices if an HTML element is completely scrolled down,
element.scrollTop + element.clientHeight
is 1
less than element.scrollHeight
even if visually it is completely scrolled. I suppose because the returned offset is rounded down.
Is there an alternative way to get scrollTop
(not only on body but any scrollable element) complete of its fractional part?