Bug Beta9: ng-click not fired anymore after one click into ng-repeat


I upgrade from beta3 to 9, but I think that I’ve found a bug. I’ve a ng-repeat with a ng-click on div. After I click once, I’m not able to do click on other list items. I downgrade to beta3 again.

Hey @biapar, can you post a codepen of this? I tried to reproduce it but couldn’t

Uhm…it’s a bit difficult to put on Codepen…

This is the code where I render the list:

   <div ng-repeat="pf in pflists | filter:mailEnabled" class="item item-background">
    <div class="row">
      <div class="col col-10 azione" ng-show="pf.childFolderCount">
        <a ui-sref="app.publicfolderschildren({ pfId: encodeUniqueID(pf.uniqueId), pfTitle:pf.name })" style="font-size: 16px;"><i class="icon ion-plus"></i></a>
      <div class="col col-67 pfcontent" ng-click="gotoPF(encodeUniqueID(pf.uniqueId),pf.name,pf.mailAddress)">  
        <h2 style="color:black;">{{pf.name}}</h2>
        <p class="subtitle">{{pf.childFolderCount}} sub folder - {{pf.itemCount}}</p>
      <div class="col azione" ng-show="pf.itemCount">
          <span class="badge badge-assertive">{{pf.unReadCount}}</span>
       <!-- <a ui-sref="app.publicfolderitems({ pfId: encodeUniqueID(pf.uniqueId), pfTitle:pf.name, pfEmail:pf.mailAddress })">
            <i class="icon ion-ios7-arrow-forward"></i>  -->  

And the function:

$scope.gotoPF = function (pfId, title, address) {
        $state.go('app.publicfolderitems', { pfId: pfId, pfTitle: title, pfEmail: address });

Beta 9: The strange thing is the click is fired only one time and not when I click on other items. I need to change view e return. If I downgrade to Beta3, it works.

So ng-click is firing, I just think your target area is small and can easily be missed.

Uhm…I don’t think that this is the problem, because if I downgrade to Beta3 without mods spacing, the ng-click works.


I see you opened an issue for it so it’s best to figure the issue out over there.
Make sure you post an accurate codepen :smile:


I’ve got the same problem.
It looks the ng-click doesn’t work only on the

I just put the ng-click to .buttons div to see if it works but the alert doesn’t come !

@dmrn, you example is a bit off from the use case.
It doesn’t work in your case because you have another button nested inside with is catching the event.

having the same issue, but only on touch events (desktop is ok)
i think it is cause ion-item directive events prevents bubling,
before it was active (greyed background) when mousedown/tap on ion-item and its children.
in beta9 there is no this effect.

beta3 has no issues.

my markup:

<li class="item item-divider item-icon-right single"
      ng-repeat-start="kwSection in kw.sections"

    <h2>{{ kwSection.title }}

<li ng-repeat-end
    <div ng-repeat="item in kwSection.items" class="item item-text-wrap kw-card-full-name">
        <a class=""
           ng-show="getItemCount(item, kwSection)"
           ng-click="minus(item, kwSection)"><i class="icon ion-ios7-minus-outline"></i></a> <strong>{{ getItemCount(item, kwSection) }}</strong>
        <a class=""
           ng-click="plus(item, kwSection)"><i class="icon ion-ios7-plus-outline"></i></a>

clicks on second li (minus, plus) dont work, but on first li click (toggleItem) works.

Hope this will help.

I believe this was resolved in the nightly builds. Can you try them @Coobaha

I confirm which was wrote by other user @Coobaha.

before it was active (greyed background) when mousedown/tap on ion-item and its children.
in beta9 there is no this effect.

beta3 has no issues.

I believe this was resolved in the nightly builds. Can you try them @Coobaha

no success :frowning:
moreover, i was wrong with

but on first li click (toggleItem) works.

ng-click not working on item directive with taps…

tried driftyco/ionic-bower#1.0.0-beta.9-nightly-258

Alright, my mistake, it was another issue I was thinking of.

Here’s the link to the issue on github.

If it helps anyone, I am seeing the exact same problem in beta 10. I’ve tried a number of things to isolate the issue but no luck. For example, I added data-tap-disabled=‘true’ to my doc root and enabled ngTouch, and various permutations with no different results.

I see the problem on an iPhone device and also on the desktop (Chrome emulator). If I ‘grab’ the list item with the mouse and ‘shake’ it (!!) something trips and clicks are properly enabled again. I know that sounds a bit dodgy.

Another clue: At the point where clicks are failing, if I use Chrome dev tools right-click ‘inspect element’ on the list item, Chrome thinks I’m pointing to the root . That’s the element it thinks I’m pointing to. When clicks are working, the same action selects the list item properly.

I suspected a z-index problem but I couldn’t find a smoking gun.

Nice! I can no longer repro in beta 11 :slight_smile:

1 Like