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.

ngClick using ngTouch fires twice #6251

Closed
@coma

Description

Activity

pre

pre commented on Mar 7, 2014

@pre

I am also having hard times with this issue.

Arkkimaagi

Arkkimaagi commented on Mar 7, 2014

@Arkkimaagi

Any ideas what's causing this, and if there's a workaround that I could use?

coma

coma commented on Mar 7, 2014

@coma
Author

I think it's something related to the event propagation, this is my workaround:

http://jsfiddle.net/coma/2hWWa

tuomaslahti

tuomaslahti commented on Mar 7, 2014

@tuomaslahti

I have a similar problem.

My app has a popup dialog with a button that closes it. When the dialog's button is on top of a text input element, clicking the button on touch screen devices not only closes the dialog, but also focuses the input.

TomiHiltunen

TomiHiltunen commented on Mar 18, 2014

@TomiHiltunen

Same problem here using angular w/ angular-touch 1.2.9.

There is no other clickable elements in the tree to propagate to. The very same click event is fired twice in a row. This does not happen with the swipes. Also, the problem of firing ngClick events twice disappears when I remove ngTouch from the project.

richardbrammer

richardbrammer commented on Mar 19, 2014

@richardbrammer

I am also having this problem in ngTouch 1.2.13,

Depending on the situation, this is more than an optical bug, but in my case leads to rather annoying usability problems:

For example I change a View with activated ngTouch and with ng-click on a touch device for to open a modal, which lays it self above the clicked element. Within this modal a clickable element is at the same place as the previously clicked element (now laying above), then it could occur that the second event is fired and the button in modal is clicked/fired.

This could lead to unwanted behaviour of the application.

pre

pre commented on Mar 20, 2014

@pre

Hi Richard, this is exactly same same kind of problem we are facing.

added a commit that references this issue on Apr 4, 2014
b92b46c
added a commit that references this issue on Apr 4, 2014
a8a0921
added this to the 1.3.0 milestone on Apr 7, 2014
self-assigned this
on Apr 7, 2014

97 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      ngClick using ngTouch fires twice · Issue #6251 · angular/angular.js