Calculate dock dragging properly to consider where page is scrolled