Fix mouse handling inside a scrollable div.

I've previously provided a pull request for this in #870 that was merged.

Unfortunately, I had modified the dist files rather than the source files, which went unnoticed. Therefore, the fix is currently not included.