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

eventPhase property of onClickCapture events has wrong value #11663

Closed
timjacobi opened this issue Nov 25, 2017 · 2 comments
Closed

eventPhase property of onClickCapture events has wrong value #11663

timjacobi opened this issue Nov 25, 2017 · 2 comments

Comments

@timjacobi
Copy link
Member

timjacobi commented Nov 25, 2017

Do you want to request a feature or report a bug?
I assume this is a bug.
What is the current behavior?
When I register an onClickCapture event handler, click on the element and then inspect the event the eventPhase property is set to 3 which is equivalent to Event.BUBBLING_PHASE.

I'm currently rewriting the ReactTreeTraversal tests to use the public API, that's how I found the problem.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Edit 6wrk742jp3
On codesandbox I would expect an alert false and then true but it is the other way round.

What is the expected behavior?
The eventPhase property should be set to Event.CAPTURING_PHASE / 1.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
I haven't tried this in versions different from 16.1.1, all testing was done in Chrome 62.

@timjacobi timjacobi changed the title eventPhase property of onClickCapture events have wrong value eventPhase property of onClickCapture events has wrong value Nov 25, 2017
@aweary
Copy link
Contributor

aweary commented Nov 26, 2017

This is a known issue, see #9783. I've got an open PR that fixes this at #10722 that I just need to polish up.

@timjacobi
Copy link
Member Author

Thanks and sorry for the dupe. I did some searching but didn’t find the old issue.

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

3 participants