Change the scrolling logic.

Add a scroll handler to handle the previously unhandled events,
and remove updateBarSizeAndPosition() where it's not needed anymore.