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

add note re: handling events in capture phase #2622

Merged
merged 2 commits into from
Dec 2, 2014
Merged

Conversation

rafd
Copy link
Contributor

@rafd rafd commented Nov 28, 2014

Couldn't find any mention in the documentation on how to handle events during the capture phase. I added a sentence in the events documentation to explain the "...Capture" syntax. Feel free to move the explanation elsewhere.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@rafd
Copy link
Contributor Author

rafd commented Nov 28, 2014

I've now signed the CLA.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@@ -35,7 +35,7 @@ String type
## Supported Events

React normalizes events so that they have consistent properties across
different browsers.
different browsers. The event handlers below are triggered by an event in the bubbling phase; to register an event handler for the capture phase, append "Capture" to the event name (for example: onClick -> onClickCapture).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sounds pretty good. Just a little tweak:

  1. Let's use backticks around the event names so they use code formatting
  2. "(for example: onClick -> onClickCapture)" can be it's own sentence. "Instead of using onClick, you would use onClickCapture to handle the click event in the capture phase" ... or something like that.

use backticks and change example into its own sentence
@rafd
Copy link
Contributor Author

rafd commented Dec 1, 2014

@zpao, made the changes

@zpao
Copy link
Member

zpao commented Dec 2, 2014

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants