question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support onClickCapture and friends

See original GitHub issue

From the react docs:

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, instead of using onClick, you would use onClickCapture to handle the click event in the capture phase.

Should we add support for this as well? I think we can just add the relevant code in HtmlAttrs.scala - Do you see any problems with this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jatcwangcommented, Sep 1, 2016

I’m not in dire need of this. I’ll add it to topic/neo branch

1reaction
jatcwangcommented, Jul 31, 2016

Here’s a good explanation: http://stackoverflow.com/questions/4616694/what-is-event-bubbling-and-capturing

So onClickCapture that’s bound on a container element will allows you to handle events in the container before the inner elements receives the event. This is useful in many cases when you want to stop propagation of the event to inner elements if some logic determines that you don’t want the inner element to see the event at all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Passing multiple actions to onClick event in a react- ...
I think there's OnClickCapture as well that works for a secondary Click Event. Probably not the most efficient way, but I think it...
Read more >
What is onClickCapture Event in ReactJS
React onClickCapture is an event handler that gets triggered whenever we click on an element. like onclick, but the difference is that ...
Read more >
Andrew Smith (@andrew_codes) / Twitter
TIL: To log all clicks in React, use onClickCapture. This simple component logs clicks in all child components. #reactjs.
Read more >
SyntheticEvent
Supported Events. React normalizes events so that they have consistent properties across different browsers. The event handlers below are triggered by an event ......
Read more >
Capturing Tabular Data from Graphical Output Part 2
and all my friends at ICON for their great ideas, enthusiasm and support, in particular Syamala Schoemperlen and. Jackie Lane. CONTACT INFORMATION.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found