Skip to content

Commit 7bcc94e

Browse files
authored
Merge pull request #352 from odsantos/update-en-moving-mouse
Update "Moving the mouse" files
2 parents c3e0bc0 + 725a55d commit 7bcc94e

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/1-behavior-nested-tooltip/solution.view/index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
<p>Once upon a time there was a mother pig who had three little pigs.</p>
5656

57-
<p>The three little pigs grew so big that their mother said to them, "You are too big to live here any longer. You must go and build houses for yourselves. But take care that the wolf does not catch you."
57+
<p>The three little pigs grew so big that their mother said to them, "You are too big to live here any longer. You must go and build houses for yourselves. But take care that the wolf does not catch you."</p>
5858

5959
<p>The three little pigs set off. "We will take care that the wolf does not catch us," they said.</p>
6060

@@ -78,12 +78,13 @@
7878
}
7979

8080
document.onmouseout = function() {
81-
// it is possible that mouseout triggered, but we're still inside the element (cause of bubbling)
81+
// it is possible that mouseout triggered, but we're still inside the element
82+
// (its target was inside, and it bubbled)
8283
// but in this case we'll have an immediate mouseover,
8384
// so the tooltip will be destroyed and shown again
8485
//
85-
// that's an overhead, but here it's not visible
86-
// can be fixed with additional checks
86+
// luckily, the "blinking" won't be visible,
87+
// as both events happen almost at the same time
8788
if (tooltip) {
8889
tooltip.remove();
8990
tooltip = false;

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/1-behavior-nested-tooltip/source.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
<p>Once upon a time there was a mother pig who had three little pigs.</p>
5656

57-
<p>The three little pigs grew so big that their mother said to them, "You are too big to live here any longer. You must go and build houses for yourselves. But take care that the wolf does not catch you."
57+
<p>The three little pigs grew so big that their mother said to them, "You are too big to live here any longer. You must go and build houses for yourselves. But take care that the wolf does not catch you."</p>
5858

5959
<p>The three little pigs set off. "We will take care that the wolf does not catch us," they said.</p>
6060

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/source.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html>
33

44
<head>
55
<meta charset="UTF-8">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ These events are special, because they have property `relatedTarget`. This prope
1313
For `mouseover`:
1414

1515
- `event.target` -- is the element where the mouse came over.
16-
- `event.relatedTarget` -- is the element from which the mouse came.
16+
- `event.relatedTarget` -- is the element from which the mouse came (`relatedTarget` -> `target`).
1717

1818
For `mouseout` the reverse:
1919

2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/mouseoverout-fast.view/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html>
33

44
<head>
55
<meta charset="UTF-8">

0 commit comments

Comments
 (0)