Closed boljen closed 9 years ago
I suspect this is a misunderstanding, though I'm not 100% certain or your issue (on phone)
The react API supports the event capturing phase. E.g
document.getElementById('el').addEventListener(event, handler, trueIfCapturePhase);
Not the PointerEvents gotPointerCapture/releasePointerCapture events: https://docs.webplatform.org/wiki/dom/PointerEvent/gotpointercapture
https://docs.webplatform.org/wiki/dom/MouseEvent is the event, more specifically https://docs.webplatform.org/wiki/dom/MouseEvent/mouseenter
@boljen what are the mouseevent*capture events? I never heard of them... also see the list of mouse events
what are the mouseevent*capture events? I never heard of them... also see the list of mouse events in react :-)
React clearly has onMouseEnter
and onMouseLeave
.
Also, from the doc:
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 usingonClick
, you would useonClickCapture
to handle the click event in the capture phase.
So I'd say this does look like a bug.
Oh nice i was missing that part of the docs. I guess since enter/leave do not bubble it doesn't make sense to have a *Capture there.
Yeah, enter/leave have special bubbling and don't have the capture phase. I'll update the docs.
First off all thank you for building this amazing library and sharing it with the rest of us.
I don't know whether this is a bug in my code, a bug in the library or by design. I suspect it's the latter?
http://jsfiddle.net/682tqxw3/6/