prajwalkman / angular-slider

(DEPRECATED) Slider directive implementation for AngularJS, without jQuery dependencies
http://prajwalkman.github.io/angular-slider
MIT License
249 stars 177 forks source link

Touch doesn't work when jQuery is loaded #26

Open douglaz opened 11 years ago

douglaz commented 11 years ago

If jQuery is loaded, then AngularJS uses jQuery but it seems that the Event object for jQuery doesn't provide a touches property, making the touch handling fail for angular-slider.

zumek commented 11 years ago

Same issue here. On line 262: event object clientX and touches are both undefined.

zumek commented 11 years ago

Fixed by using addEventListener to bind events.

krumax commented 10 years ago

I realized that on a touch device

event.touches[0].clientX

get's undefined (onMove input binding) using the jQuery lib and not jqlite provide by angular. The correct corresponding object should be

event.originalEvent.touches[0].clientX

I actually don't know very much about that event object, but that fix did it for me.

ghost commented 10 years ago

Thank you krumax! You solved my problem! =D

TKuypers commented 10 years ago

The solution of krumax also fixed it for me!

Soviut commented 10 years ago

I also hit this issue. The move event should check for the existence of event.originalEvent and get its touches from there if it exists.