From a45788bb266c5ec85cdd4b718e179e8dce8414de Mon Sep 17 00:00:00 2001 From: Joachim Klug Date: Sun, 21 Jun 2020 08:37:25 +0200 Subject: [PATCH] Correct misspelling retarteted -> retargeted Fixes javascript-tutorial/en.javascript.info#1966 --- 2-ui/3-event-details/6-pointer-events/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-ui/3-event-details/6-pointer-events/article.md b/2-ui/3-event-details/6-pointer-events/article.md index 734b76bd..7c4d0a06 100644 --- a/2-ui/3-event-details/6-pointer-events/article.md +++ b/2-ui/3-event-details/6-pointer-events/article.md @@ -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`. -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. @@ -226,4 +226,4 @@ Additional abilities of Pointer events are: - Device-specific properties, such as `pressure`, `width/height` and others. - Pointer capturing: we can retarget all pointer events to a specific element until `pointerup`/`pointercancel`. -As of now, pointer events are supported in all major browsers, so we can safely switch to them, if IE10- and Safari 12- are not needed. And even with those browsers, there are polyfills that enable the support of pointer events. \ No newline at end of file +As of now, pointer events are supported in all major browsers, so we can safely switch to them, if IE10- and Safari 12- are not needed. And even with those browsers, there are polyfills that enable the support of pointer events.