Skip to content

Commit 8c1129f

Browse files
committed
closes #1318
1 parent 0a7e953 commit 8c1129f

File tree

1 file changed

+3
-5
lines changed
  • 2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave

1 file changed

+3
-5
lines changed

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/article.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ Also move the pointer into the child `div`, and then move it out quickly down th
6767
```
6868

6969
```smart header="If `mouseover` triggered, there must be `mouseout`"
70-
In case of fast mouse movements, intermediate elements may be ignores, but one thing we know for sure: elements can be only skipped as a whole.
71-
72-
If the pointer "officially" entered an element with `mouseover`, then upon leaving it we always get `mouseout`.
70+
In case of fast mouse movements, intermediate elements may be ignored, but one thing we know for sure: if the pointer "officially" entered an element with `mouseover`, then upon leaving it we always get `mouseout`.
7371
```
7472
7573
## Mouseout when leaving for a child
@@ -111,7 +109,7 @@ parent.onmouseover = function(event) {
111109
};
112110
```
113111

114-
If the code inside the handlers doesn't look at `target`, then it might think that the mouse left the `parent` element, and then came back over it. But it's not the case! The mouse never left, it just moved to the child element.
112+
If we don't examine `event.target` inside the handlers, then it may seem that the mouse left `parent` element, and then came back over it. But it's not the case! The mouse never left, it just moved to the child element.
115113

116114
If there's some action upon leaving the element, e.g. animation runs, then such interpretation may bring unwanted side effects.
117115

@@ -206,4 +204,4 @@ These things are good to note:
206204

207205
Events `mouseover/out` trigger even when we go from the parent element to a child element. The browser assumes that the mouse can be only over one element at one time -- the deepest one.
208206

209-
Events `mouseenter/leave` are different in that aspect: they only trigger when the mouse comes in and out the element as a whole. Also they do not bubble.
207+
Events `mouseenter/leave` are different in that aspect: they only trigger when the mouse comes in and out the element as a whole. Also they do not bubble.

0 commit comments

Comments
 (0)