The previous implementation walked the HTMLElement ancestry
using the element.offsetParent chain. However, some elements
in the acenstry may contain scroll offsets that are not
taken into account with this approach.
This new implementation walks the HTMLElement ancestry using
element.parentElement to include all scroll offsets.
Client/offset offsets are added only for offsetParent elements.
No longer reverse order of elements in the acnestry. Instead
we reverse the order of matrix multiplications.
Removed origin addition in dispatchers since that is taken into account
by offset chain.
The previous implementation walked the
HTMLElement
ancestry using theelement.offsetParent
chain. However, some elements in the acenstry may contain scroll offsets that are not taken into account with this approach.This new implementation walks the
HTMLElement
ancestry usingelement.parentElement
to include all scroll offsets. Client/offset offsets are added only for offsetParent elements.No longer reverse order of elements in the acnestry. Instead we reverse the order of matrix multiplications.
Removed origin addition in dispatchers since that is taken into account by offset chain.
Updated unit test stub.