While working on the RevisionSlider and improving the mobile device support there [1][2], I stumbled over an issue with jQuery giving a wrong offsets when used with Chrome and scaled viewport. [3] This leads to misplaced tooltips since they rely on the offset() values.
Steps to reproduce:
- open some page with the RevisionSlider in Chrome on a touch device ( e.g. https://www.mediawiki.org/w/index.php?diff=2301969&oldid=2285787&title=MediaWiki&action=historysubmit&type=revision )
- click on a revision bar
- the tooltip should show below the bar pointing at it
- zoom in and click again on a bar
- you will see the tooltip somewhere or not at all and definitely not pointing at the bar :-)
Of cause this might affect also other things where $().offset() is used.
In my patch I fixed offset calculation at some other part where I needed it with the help of the workaround you find in the GitHub issue. [3]
[1] https://phabricator.wikimedia.org/T164249
[2] https://gerrit.wikimedia.org/r/#/c/351642/
[3] https://github.com/jquery/jquery/issues/3187