Make sure cursor is inside scrollbox when passing clicks

Closes #765
Merge pull request #766 from dorkster/scrollbox

Make sure cursor is inside scrollbox when passing clicks