Skip to content

Commit 841d750

Browse files
authored
Merge pull request #2014 from leviding/patch-20
Fix minor typo error: change when when to when
2 parents 3558415 + 6800c2a commit 841d750

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

2-ui/3-event-details/1-mouse-events-basics/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ We've already seen some of these events:
2424
: Triggers after two clicks on the same element within a short timeframe. Rarely used nowadays.
2525

2626
`contextmenu`
27-
: Triggers when when the right mouse button is pressed. There are other ways to open a context menu, e.g. using a special keyboard key, it triggers in that case also, so it's not exactly the mouse event.
27+
: Triggers when the right mouse button is pressed. There are other ways to open a context menu, e.g. using a special keyboard key, it triggers in that case also, so it's not exactly the mouse event.
2828

2929
...There are several other events too, we'll cover them later.
3030

@@ -34,7 +34,7 @@ As you can see from the list above, a user action may trigger multiple events.
3434

3535
For instance, a left-button click first triggers `mousedown`, when the button is pressed, then `mouseup` and `click` when it's released.
3636

37-
In cases when a single action initiates multiple events, their order is fixed. That is, the handlers are called in the order `mousedown` -> `mouseup` -> `click`.
37+
In cases when a single action initiates multiple events, their order is fixed. That is, the handlers are called in the order `mousedown` -> `mouseup` -> `click`.
3838

3939
```online
4040
Click the button below and you'll see the events. Try double-click too.
@@ -50,7 +50,7 @@ Also we can see the `button` property that allows to detect the mouse button, it
5050

5151
Click-related events always have the `button` property, which allows to get the exact mouse button.
5252

53-
We usually don't use it for `click` and `contextmenu` events, because the former happens only on left-click, and the latter -- only on right-click.
53+
We usually don't use it for `click` and `contextmenu` events, because the former happens only on left-click, and the latter -- only on right-click.
5454

5555
From the other hand, `mousedown` and `mouseup` handlers we may need `event.button`, because these events trigger on any button, so `button` allows to distinguish between "right-mousedown" and "left-mousedown".
5656

2-ui/3-event-details/4-mouse-drag-and-drop/ball.view/index.html

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

1414

1515
<script>
16-
ball.onmousedown = function(event) {
16+
ball.onmousedown = function(event) {
1717
ball.style.position = 'absolute';
1818
ball.style.zIndex = 1000;
1919
document.body.appendChild(ball);

0 commit comments

Comments
 (0)