Fix mouse handling inside a scrollable div.

See also #870, which was incorrectly merged.
Merge pull request #1167 from aspectit/scrollTop-new

Fix mouse handling inside a scrollable div.