cgarvis / angular-toggle-switch

AngularJS Toggle Switch
http://cgarvis.github.io/angular-toggle-switch
MIT License
160 stars 124 forks source link

toggle jumps back on android 4.3 and 4.2.2 #36

Open Goltergaul opened 10 years ago

Goltergaul commented 10 years ago

I have the toggle switch working as expected im my browser and on android 4.4. However on a android 4.2.2 or 4.3 device the switch jumps back to its previous position right after it is switched. The only way to correctly switch the button is by holding it down a short time and then releasing it again.

Any idea what could cause this behaviour?

cgarvis commented 10 years ago

I might have to integrate with ngTouch. Sounds like <= 4.3 Android might be doing a double click.

Goltergaul commented 10 years ago

maybe but i would not see why a single tap should result in a doubleclick?

cgarvis commented 10 years ago

See http://www.ng-newsletter.com/posts/angular-on-mobile.html. Seems that in mobile there is a "fast" click and then a delayed "click" which results in a double click. Unforunately I moved angular-toggle-switch away from ng-click so I can't use ngTouch.