Added some code to make sure horizontal scroll was active before capturing event