I actually thought this was a feature at first but now think it's a bug.
I've fixed this by changing the following line:
elementOffsetTop = self.element.position().top;
To this:
elementOffsetTop = self.element.offset().top;
"position()" calculates the element position relative to the offset parent,
where "offset()" calculates the element position relative to the document.
I actually thought this was a feature at first but now think it's a bug.
I've fixed this by changing the following line:
elementOffsetTop = self.element.position().top;To this:
elementOffsetTop = self.element.offset().top;"position()" calculates the element position relative to the offset parent,
where "offset()" calculates the element position relative to the document.