Support onClickCapture and friends
See original GitHub issueFrom 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:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m not in dire need of this. I’ll add it to
topic/neo
branchHere’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.