8000 ng-touch - Child element triggers ng-click for parent · Issue #10366 · angular/angular.js · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
ng-touch - Child element triggers ng-click for parent #10366
Closed
@bzamora

Description

@bzamora

Example of problem below:

http://codepen.io/bzamora/pen/OPyogw

I am using ng-touch in my AngularJS app to provide touch events. I am using the ng-touch built in ng-click-active class to animate a tile when clicked. All is good so far, no issues.

There is also a checkbox inside the tile that is only displayed when the user is in "edit" mode. At this point, I don't want the clicking of the checkbox to trigger the parent's element click. I've tried canceling the click when in edit mode ng-click="inEditMode === false && doStuff() and also using $event.stopPropagation() in the checkbox to try to stop the click event from propagating up to the tile. Nothing has worked so far...

Thanks for any help!

Also asked in SO: http://stackoverflow.com/questions/27272989/ng-touch-child-element-triggers-ng-click-for-parent

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0