-
Notifications
You must be signed in to change notification settings - Fork 45.6k
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
event.currentTarget is null in onMouseMove event handler #8690
Comments
Currently, It might be able to avoid to assign But I'm not sure what that change affects. |
When an event bubbles then @yenshih are you relying on bubbling/capturing at all? Can you use handleMouseMove(event) {
event.persist()
const element = event.currentElement
this.handleThrottleMouseMove(event, element)
}
handleThrottleMouseMove(event, element) {
console.log(element) // <li /> or whatever
} |
Closing since there's been no response and I believe this is expected behavior |
Even using this approach with react |
Any solution to this? |
Browser: Chrome LTS
React ver: LTS
I guess event.currentTarget might be <li> element, but it's null.
It seems so weird because event.currentTarget would refers to the element to which the event handler has been attached.
I was wondering if someone could help me solve this problem. Thanks :)
The text was updated successfully, but these errors were encountered: