Correct misspelling retarteted -> retargeted
Fixes javascript-tutorial/en.javascript.info#1966
This commit is contained in:
parent
2f80cb7eb0
commit
a45788bb26
1 changed files with 2 additions and 2 deletions
|
@ -177,7 +177,7 @@ But we continue tracking track `pointermove` events and move the thumb until `po
|
||||||
|
|
||||||
[Previously](info:mouse-drag-and-drop), to handle `pointermove` events that happen outside of the slider, we listened for `pointermove` events on the whole `document`.
|
[Previously](info:mouse-drag-and-drop), to handle `pointermove` events that happen outside of the slider, we listened for `pointermove` events on the whole `document`.
|
||||||
|
|
||||||
Pointer capturing provides an alternative solution: we can call `thumb.setPointerCapture(event.pointerId)` in `pointerdown` handler, and then all future pointer events until `pointerup` will be retarteted to `thumb`.
|
Pointer capturing provides an alternative solution: we can call `thumb.setPointerCapture(event.pointerId)` in `pointerdown` handler, and then all future pointer events until `pointerup` will be retargeted to `thumb`.
|
||||||
|
|
||||||
That is: events handlers on `thumb` will be called, and `event.target` will always be `thumb`, even if the user moves their pointer around the whole document. So we can listen at `thumb` for `pointermove`, no matter where it happens.
|
That is: events handlers on `thumb` will be called, and `event.target` will always be `thumb`, even if the user moves their pointer around the whole document. So we can listen at `thumb` for `pointermove`, no matter where it happens.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue