Safari getBoundingClientRect () Injection Return Invalid Up
I have a
and I am trying to get its distance from the top of the viewport. In every browser except Safari, I get the expected results from
. Safari seems to be reporting the distance of the element from the top of the page, not the viewport. This is contrary to what is defined in the specification for this method (as I understand it). Is Safari just breaking the rules here, or are other browsers more forgiving of some kind of bug I can't see?
source to share