Ng-click fires twice in response to a single tap

Yep! I encountered the same issue as you (tested with Ionic 1.1.1 to 1.2.4) — logging the event sent two Mouse events at the same coordinates (or offset slightly by 1px)…the only real difference was the timestamp!

To fix in the meantime, I converted all of my “ng-click” to “on-tap” events…now, it’s working flawlessly.

Would love to get a fix (and figure out why this is happening), but this workaround is doing the job in the meantime.


Hey everybody,
I opened an issue here about this:

and I made a codePen: (run it twice to make it work)

Had exactly the same issue. My back button does a save to the database which can take a few seconds. If this happens the back is fired twice. I think it’s related to the fact that the button will be disabled (if you disable a button on the ng-click, the event also fires twice - which is also a bug). The easiest solution for now is to use <a> instead of <button>. I’ve changed all my <button></button> tags to <a></a> tags and the problem is gone.

I’m having the same problem, but changing <button> to <a> doesn’t help.

Is it legit to use on-tap instead of ng-click? It seems to work just fine, are there any drawbacks to this approach?

In the latest version of IONIC, changing <button> to <a> doesn’t work anymore. What I do now is define my own back-button instead of relying on the back-button provided by IONIC and build in logic to ignore the second click:


<ion-nav-buttons side="left">
	<a class="button button-clear back-button header-item" ng-click="goBack()">
		<i class="icon ion-ios-arrow-back"></i>&nbsp;Back


$scope.$on('$ionicView.enter', function()
	$ = true;

$scope.goBack = function()
	if ($
		$ = false;
		// Do other stuff, like saving data to the database

Kludgy, but it works.

I had the exact problem as persyval and thanks to him, it’s solved.

Adding data-tap-disabled=“true” to the button helps.

Thanks mate!

it helps !:slight_smile: thanks a lot!