> Please revert two of those changes, since it's not relevant and can make offsetX == NaN

I was actually relying of that behaviour, since that seemed to reset the scrollbar position.
Unfortunately I've just found that in RTL languages, this only works like expected in Firefox, so it's back to the drawing board again...