leftstick / angular-number-picker

A directive used for picking number by using up/down button, instead of typing
MIT License
23 stars 11 forks source link

Incorrect step on single click #6

Closed Trylar closed 8 years ago

Trylar commented 8 years ago

I have Ionic application and this directive works strange for me. On long tap step is correct, but on single short tap it doubles.

I found it happens because two events are fired: 'touchend' and 'click'.

leftstick commented 8 years ago

Since i preventDefault while touchstart is triggered, click should never be called in touchable device.

Can you provide snippet or plunker of your case?

Trylar commented 8 years ago

Thanks for response, this is plunker http://plnkr.co/edit/bKIHWX53QsqvOSxa7mfB?p=preview To reproduce behavior you should turn on device mode.

leftstick commented 8 years ago

Seems that ionic will trigger touchend event one more time, which i have no idea why is that!

But i have a quick fix on this in my side. You can try the latest version