Critical change for touch events

Fixed bugs breaking the script on touch devices and using event type
specific calls as devices are hybrid between mobile and desktop
nowadays.
(deskstop with touch or touch with mouse)