fix horizontal scrolling with mouse wheel/touchpad

Fix bug in scroll button handling.