Quick tap not firing ng-click event - Solved


#1

Howdy! I have a standard Ionic app running on my Android 4.4 phone and all works well except when a user does a quick tap on a button. The button animates (i.e there is UI feedback), but the controller event does not fire on the ng-click … a slightly longer tap is required.

I have tried using on-tap instead of ng-click, but same effect happens. This looks as if it is by design, but I do feel it impedes my users experience somewhat. I am not sure if it is related to the 300ms issue (I don’t think so as Ionic takes care of this?)


#2

I have just noticed when debugging using Chrome ADB (using Timeline) that the problem lies in the way I click the buttons … if I don’t tap directly on, but slide a fraction in the tapping motion, the touchmove event gets fired which then stops ng-click from happening!

Thus it seems I need to use the on-touch event instead of ng-click for a more native feel, and for people with slide-y fingers! e.g. button on-touch=“myFunction”

Just in case anyone else was tearing their hair out!