Open alebedev opened 11 years ago
Small fix for attached code, in cases when originalEvent
is undefined:
// Copy touches to jQuery event if (jqEvents) { if (e.originalEvent) { e.touches = e.originalEvent.touches; e.changedTouches = e.originalEvent.changedTouches; e.targetTouches = e.originalEvent.targetTouches; } else { e.touches = e.changedTouches = e.targetTouches = []; } }
Thank you - jQuery event binding is an experimental feature, and not enabled by default because I know it has bugs. I wanted to leave the code in so that people could experiment and fix the bugs, so it seems that worked. ;)
Option to bind events via jQuery is great and significantly simplifies customizing iscroll behavior. There's, however, crash bug on touch devices caused by lack of TouchEvent attributes on jQuery events.
I fixed this by making change from patch below. Please consider including it into default implementation.