More bug fixing on scrolling due to differences in multiple and single mode

- Fixed double event handler when using titlebar to toggle collapse/expand (causing effect to be cancelled sometimes)
- Fixed overshooting of scrolling in multiple or single mode (need different timing algorithms)
- Fixed mis-calculation of scrolling distance under certain conditions