Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stopImmediatePropagation support #1734

Closed
ryanseddon opened this issue Jun 23, 2014 · 2 comments
Closed

stopImmediatePropagation support #1734

ryanseddon opened this issue Jun 23, 2014 · 2 comments

Comments

@ryanseddon
Copy link
Contributor

It would be good to have stopImmediatePropagation support. My current use case is the following I have both a onClick and onTouchEnd event attached, on touch event supporting devices this will trigger the event handler twice.

<div onClick={this.handleTap} onTouchEnd={this.handleTap} />

It's natively supported IE9+ and a simple polyfill will be easy for IE8 since react already has a synthetic event system.

@sophiebits
Copy link
Collaborator

I don't think it would make sense for stopImmediatePropagation on a touchend to stop a click event from firing. If you do e.preventDefault() on the touchend, my guess is it'll work already – can you to test to see?

@ryanseddon
Copy link
Contributor Author

Ah cool that works! Why didn't I think of that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants