G
G
gallantalex2018-02-21 16:00:36
React
gallantalex, 2018-02-21 16:00:36

How to remove multiple firings of such events as onMouseover, onMouseOver?

Hello. Can anyone tell me what's wrong:
There is a component, it has blocks - divs are ordinary, other imported components. And onMouseOver and onMouseOut handlers are hung on this base component. It is expected that these events should fire only when the cursor is hovering over this component and when it goes out of its scope. But the events are fired when I move the cursor between its nested elements inside the component. How can this be fixed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2018-02-21
@gallantalex

When hovering and going out of scope, these are onmouseenter and onmouseleave (in React, respectively: onMouseEnter and onMouseLeave)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question