From e33df5b21c6d8e3a895501148351caa6c3441e11 Mon Sep 17 00:00:00 2001
From: plehegar Viewport manipulations (panning and zooming) - generally, as a result of a direct manipulation interaction - are intentionally NOT a default action of pointer events, meaning that these behaviors (e.g. panning a page as a result of moving a finger on a touchscreen) cannot be suppressed by cancelling a pointer event. Authors must instead use For all pointer events in the table above except Similar to the MouseEvents [[UI-EVENTS]] the Similar to {{MouseEvent}} [[UI-EVENTS]] the For A user agent MUST fire a pointer event named This section is an addition to click and
- auxclick events defined in [[UIEVENTS]] and
- contextmenu defined in [[HTML]].
+ This section is an addition to click and
+ auxclick events defined in [[UIEVENTS]] and
+ [=HTMLElement/contextmenu=] defined in [[HTML]].
The type of these events MUST be When the user agent calculates Let targetDocument be target's node document [[!DOM]].
+ Let targetDocument be target's [=Node/node document=] [[DOM]].
If the event is Pointer Events and Interfaces
PointerEvent
Interface
+
dictionary PointerEventInit : MouseEventInit {
long pointerId = 0;
double width = 1;
@@ -495,9 +498,9 @@
Attributes and Default Actions
touch-action
to explicitly declare the direct manipulation behavior for a region of the document. Removing this dependency on the cancellation of events facilitates performance optimizations by the user agent.pointerenter
and pointerleave
the composed
([[DOM]]) attribute SHOULD be true
.
- For all pointer events in the table above the detail
[[UI-EVENTS]] attribute SHOULD be 0.fromElement
and toElement
in MouseEvents to support legacy content. In those user agents, the values of those (inherited) attributes in PointerEvents must be null
to encourage the use of the standardized alternates (i.e. target
and relatedTarget
).relatedTarget
should be initialized to the element whose bounds the pointer just left (in the case of a pointerover
or pointerenter
event) or the element whose bounds the pointer is entering (in the case of a pointerout
or pointerleave
). For other pointer events, this value will default to null. Note that when an element receives the pointer capture all the following events for that pointer are considered to be inside the boundary of the capturing element.relatedTarget
should be initialized to the element whose bounds the pointer just left (in the case of a pointerover
or pointerenter
event) or the element whose bounds the pointer is entering (in the case of a pointerout
or pointerleave
). For other pointer events, this value will default to null. Note that when an element receives the pointer capture all the following events for that pointer are considered to be inside the boundary of the capturing element.gotpointercapture
and lostpointercapture
all the attributes except the ones defined in the table above should be the same as the Pointer Event that caused the user agent to run Process Pending Pointer Capture and fire the gotpointercapture
and lostpointercapture
events.The
pointerover
eventThe
pointerenter
eventpointerenter
when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown
event from a device that does not support hover (see pointerdown
). Note that setPointerCapture
or releasePointerCapture
might have changed the hit test target and while a pointer is captured it is considered to be always inside the boundaries of the capturing element for the purpose of firing boundary events. This event type is similar to pointerover
, but differs in that it does not bubble.mouseenter
event described in [[UIEVENTS]], and the CSS :hover
pseudo-class described in [[CSS21]]. See also the pointerleave
event.mouseenter
event described in [[UIEVENTS]], and the CSS :hover
pseudo-class described in [[CSS21]]. See also the pointerleave
event.The
@@ -634,9 +637,9 @@ pointerdown
eventThe
lostpointercapture
eventThe
- click
, auxclick
, and contextmenu
eventsPointerEvent
but the dispatch process is going to match that of the original specification.
For these events, all PointerEvent
specific attributes (defined in this spec) other than pointerId
and pointerType
will have their default values.
The pointerId
and pointerType
of these events MUST be the same as the PointerEvents that caused these events if they are generated by a pointing device.
From f460eb66491d41eee39f91188722b7281825623f Mon Sep 17 00:00:00 2001
From: plehegar
the default value.PointerEvent
InterfacetiltX
/ tiltY
from
azimuthAngle
/ altitudeAngle
it SHOULD round the final integer values using
- Math.round
([[ECMA-262]]) rules.PointerEvent
interface inherits from MouseEvent
, defined in [[UIEVENTS]] and extended by [[[CSSOM-VIEW]]].Firing events using the
PointerEvent
interfacepointerdown
, pointermove
, or pointerup
set active document for the event's pointerId
to targetDocument.Setting Pointer Capture
pointerId
provided as the method's argument does not match any of the active pointers, then throw a DOMException
with the name NotFoundError
.pointerId
.
- connected
([[!DOM]]), throw an exception with the name InvalidStateError
.InvalidStateError
.InvalidStateError
.pointerId
, set the pending pointer capture target override to the {{Element}} on which this method was invoked.Implicit Release of Pointer Capture
(see compatibility mouse events),
and if in an implicit release scenario both click
and lostpointercapture
events are fired,
click
SHOULD be fired before lostpointercapture
.
When the pointer capture target override is no longer connected
([[DOM]]),
+
When the pointer capture target override is no longer [=connected=] ([[DOM]]),
the pending pointer capture target override and pointer capture target override nodes SHOULD be cleared
and also a PointerEvent named lostpointercapture
corresponding to the captured pointer SHOULD be fired at the document.
When a pointer lock ([[!PointerLock]]) is successfully applied on an element, a user agent MUST run the steps as if the releasePointerCapture() method has been called if any element is set to be captured or pending to be captured. @@ -969,8 +969,8 @@
The events in the coalesced event list will have increasing
- timeStamps
- ([[!WHATWG-DOM]]), so the first event will have the smallest timeStamp
.
<style>
@@ -1067,9 +1067,8 @@ Predicted events
coalesced event list in the future; otherwise it is an empty list.
The number of events in the list and how far they are from the current timestamp are determined by
the user agent and the prediction algorithm it uses.
-
- The events in the predicted event list will have increasing
- timeStamps
([[!WHATWG-DOM]]),
+
+
The events in the predicted event list will have increasing {{Event/timeStamp}}s ([[!WHATWG-DOM]]),
so the first event will have the smallest timeStamp
which should still be greater than
the last event in the coalesced event list.
@@ -1110,18 +1109,17 @@ Populating and maintaining the coalesced and predicted event listsSet the event's coalesced event list and predicted event list to an empty list.
Initialize the rest of the attributes the same way as PointerEvent.
-
+
A PointerEvent has an associated coalesced events targets dirty and an associated
predicted events targets dirty flag. When an event is created they must be initialized to false.
-
+
When the PointerEvent's target is changed, set coalesced events targets dirty
and predicted events targets dirty
to true.
When the getCoalescedEvents
method is called:
- If the coalesced events targets dirty is true:
- for each event in the coalesced event list, set the event's
-
target
+ for each event in the coalesced event list, set the event's {{Event/target}}
to this PointerEvent
's target.
- Set the coalesced events targets dirty to false.
- Return the coalesced event list.
@@ -1130,8 +1128,7 @@ Populating and maintaining the coalesced and predicted event listsWhen the getPredictedEvents
method is called:
- If the predicted events targets dirty is true:
- for each event in the predicted event list, set the event's
-
target
to
+ for each event in the predicted event list, set the event's {{Event/target}} to
this PointerEvent
's target
.
- Set the predicted events targets dirty to false.
- Return the predicted event list.
From 3e072b9e5904bed15e359ad26ac472e7da698726 Mon Sep 17 00:00:00 2001
From: plehegar
Date: Thu, 27 May 2021 09:54:38 -0400
Subject: [PATCH 04/10] Refreshed HTML references
---
index.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/index.html b/index.html
index eeb231c..afb7147 100644
--- a/index.html
+++ b/index.html
@@ -542,14 +542,14 @@ The pointermove
event
A user agent MUST fire a pointer event named pointermove
when a pointer changes button state.
Additionally one pointermove
MUST be fired when pointer changes coordinates, pressure, tangential pressure, tilt, twist, or
contact geometry (e.g. width
and height
) and the circumstances produce no other pointer events defined in this specification.
- User agents may decide to coalesce or align these events to animation frame callbacks.
+ User agents may decide to coalesce or align these events to animation frame callbacks.
The coalesced events information will be exposed via getCoalescedEvents
for the single dispatched pointermove
event.
The final coordinates of such events should be used for finding the target of the event.
The pointerrawupdate
event
A user agent MUST fire a pointer event
- named pointerrawupdate
only within a secure context when
+ named pointerrawupdate
only within a [=secure context=] when
a pointing device attribute (i.e. button state, coordinates, pressure, tangential pressure, tilt, twist, or contact geometry) is changed.
In contrast with pointermove
, which might be aligned to animation callbacks,
user agents SHOULD dispatch pointerrawupdate
events as soon as possible
@@ -558,11 +558,11 @@
The pointerrawupdate
event
due to the fact that pointermove
events might get aligned with animation frame callbacks and get coalesced, and the final position of the event
which is used for finding the target
could be different from its coalesced events.
Note that if there is already another pointerrawupdate
with the same pointerId
that hasn't been dispatched
- in the task queue, the
- user agent MAY coalesce the new pointerrawupdate
with that event instead of creating a new task.
+ in the task queue, the
+ user agent MAY coalesce the new pointerrawupdate
with that event instead of creating a new [=task=].
This may cause pointerrawupdate
to have coalesced events, and
they will all be delivered as coalesced events of one pointerrawupdate
event as soon as
- the event is processed in the task queue.
+ the event is processed in the task queue.
See getCoalescedEvents
for more information.
In terms of ordering of pointerrawupdate
and pointermove
,
if the user agent received an update from the platform that causes both pointerrawupdate
and pointermove
events,
@@ -592,7 +592,7 @@
The pointercancel
event
User agents can trigger panning or zooming through multiple pointer types (such as touch and pen),
and therefore the start of a pan or zoom action may result in the cancellation of various pointers, including pointers with different pointer types.
To prevent cancellation of the pointer stream due to these behaviors see the touch-action CSS property section.
- - Immediately before drag operation starts [[HTML]],
+
- Immediately before drag operation starts [[HTML]],
for the pointer that caused the drag operation.
If the start of the drag operation is prevented through any means
(e.g. through calling
preventDefault
on the dragstart
event)
From 4b809742f6fabd178ed5a3926fdd6fcb4568ac3c Mon Sep 17 00:00:00 2001
From: plehegar
Date: Thu, 27 May 2021 09:55:03 -0400
Subject: [PATCH 05/10] Refreshed COMPAT reference
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index afb7147..72ca936 100644
--- a/index.html
+++ b/index.html
@@ -816,7 +816,7 @@ Details of touch-action
values
- manipulation
- The user agent MAY consider direct manipulation interactions that begin on the element only for the purposes of panning and continuous zooming (such as pinch-zoom), but MUST NOT trigger other related behaviors that rely on multiple activations that must happen within a set period of time (such as double-tap to zoom, or double-tap and hold for single-finger zoom).
- Additional touch-action
values common in implementations are defined in [[COMPAT]].
+ Additional touch-action
values common in implementations are defined in [[COMPAT]].
The touch-action
property only applies to elements that support both the CSS width
and height
properties (see [[CSS21]]). This restriction is designed to facilitate user agent optimizations for low-latency direct manipulation panning and zooming. For elements not supported by default, such as <span>
which is a non-replaced inline element, authors can set the display
CSS property to a value, such as block
, that supports width
and height
. Future specifications could extend this API to all elements.
The direction-specific pan values are useful for customizing some overscroll behaviors.
From 95e7521d7a2b4ef1f9d3c5eef9277475ec89903f Mon Sep 17 00:00:00 2001
From: plehegar
Date: Thu, 27 May 2021 09:55:47 -0400
Subject: [PATCH 06/10] Refreshed PointerLock references
---
index.html | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/index.html b/index.html
index 72ca936..92a76e8 100644
--- a/index.html
+++ b/index.html
@@ -929,7 +929,7 @@ Implicit Release of Pointer Capture
When the pointer capture target override is no longer [=connected=] ([[DOM]]),
the pending pointer capture target override and pointer capture target override nodes SHOULD be cleared
and also a PointerEvent named lostpointercapture
corresponding to the captured pointer SHOULD be fired at the document.
- When a pointer lock ([[!PointerLock]]) is successfully applied on an element, a user agent MUST run the steps as if the releasePointerCapture() method has been called if any element is set to be captured or pending to be captured.
+
When a pointer lock ([[PointerLock]]) is successfully applied on an element, a user agent MUST run the steps as if the releasePointerCapture() method has been called if any element is set to be captured or pending to be captured.
@@ -996,23 +996,21 @@
Coalesced events
paint(e); // Paint the final coalesced point
}
});
-
+
function paint(event) {
if(event.buttons>0) {
context.fillRect(event.clientX, event.clientY, 5, 5);
}
}
-
+
</script>
-
+
The PointerEvent's attributes will be initalized in a way that best represents
the events in the coalesced event list.
- For example its
- movementX and
- movementY
+ For example its {{MouseEvent/movementX}} and {{MouseEvent/movementY}}
([[POINTERLOCK]]) COULD be the sum of those of all the coalesced events.
-
+
The order of all these dispatched events should resemble the actual order of the
original events' order. For example if a pointerdown
event causes the dispatch for the
From 8c25ae9e036813e4c9498d3798d8511820953c53 Mon Sep 17 00:00:00 2001
From: plehegar
Date: Thu, 27 May 2021 09:56:18 -0400
Subject: [PATCH 07/10] Refreshed touch events references
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 92a76e8..68dcbe5 100644
--- a/index.html
+++ b/index.html
@@ -1204,7 +1204,7 @@ Mapping for devices that do not support hover
- If the pointer event dispatched was
pointerup
or pointercancel
, clear the PREVENT MOUSE EVENT
flag for this pointerType
.
- If the user agent supports both Touch Events (as defined in [[TOUCH-EVENTS]]) and Pointer Events, the user agent SHOULD NOT generate compatibility mouse events as described in this section as it is likely to introduce compatibility problems for sites that expect mouse events to be generated in accordance with the model outlined in [[TOUCH-EVENTS]].
+ If the user agent supports both Touch Events (as defined in [[TOUCH-EVENTS]]) and Pointer Events, the user agent SHOULD NOT generate compatibility mouse events as described in this section as it is likely to introduce compatibility problems for sites that expect mouse events to be generated in accordance with the model outlined in [[TOUCH-EVENTS]].
The activation of an element (click
) with a primary pointer that does not support hover (e.g. single finger on a touchscreen) would typically produce the following event sequence:
From c5c70b9202f12667fe5cc9d812aad8c2c0d3d505 Mon Sep 17 00:00:00 2001
From: Philippe Le Hegaret
Date: Fri, 28 May 2021 16:01:09 -0400
Subject: [PATCH 08/10] Math ref
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Marcos Cáceres
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 68dcbe5..7867d70 100644
--- a/index.html
+++ b/index.html
@@ -338,7 +338,7 @@ PointerEvent
Interface
the default value.
When the user agent calculates tiltX
/ tiltY
from
azimuthAngle
/ altitudeAngle
it SHOULD round the final integer values using
- Math.round ([[ECMASCRIPT]]) rules.
+ Math.round ([[ECMASCRIPT]]) rules.
The PointerEvent
interface inherits from MouseEvent
, defined in [[UIEVENTS]] and extended by [[[CSSOM-VIEW]]].
From e9998d2433e0fabfe96cdead10e23a4a72ea3d83 Mon Sep 17 00:00:00 2001
From: Philippe Le Hegaret
Date: Fri, 28 May 2021 16:01:32 -0400
Subject: [PATCH 09/10] UIEvent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Marcos Cáceres
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 7867d70..e2e1c89 100644
--- a/index.html
+++ b/index.html
@@ -499,7 +499,7 @@ Attributes and Default Actions
For all pointer events in the table above except pointerenter
and pointerleave
the composed
([[DOM]]) attribute SHOULD be true
.
For all pointer events in the table above the {{UIEvent/detail}} [[UI-EVENTS]] attribute SHOULD be 0.
Many user agents expose non-standard attributes fromElement
and toElement
in MouseEvents to support legacy content. In those user agents, the values of those (inherited) attributes in PointerEvents must be null
to encourage the use of the standardized alternates (i.e. target
and relatedTarget
).
- Similar to {{MouseEvent}} [[UI-EVENTS]] the relatedTarget
should be initialized to the element whose bounds the pointer just left (in the case of a pointerover
or pointerenter
event) or the element whose bounds the pointer is entering (in the case of a pointerout
or pointerleave
). For other pointer events, this value will default to null. Note that when an element receives the pointer capture all the following events for that pointer are considered to be inside the boundary of the capturing element.
+ Similar to {{MouseEvent}}, the {{FocusEvent/relatedTarget}} should be initialized to the element whose bounds the pointer just left (in the case of a pointerover
or pointerenter
event) or the element whose bounds the pointer is entering (in the case of a pointerout
or pointerleave
). For other pointer events, this value will default to null. Note that when an element receives the pointer capture all the following events for that pointer are considered to be inside the boundary of the capturing element.
For gotpointercapture
and lostpointercapture
all the attributes except the ones defined in the table above should be the same as the Pointer Event that caused the user agent to run Process Pending Pointer Capture and fire the gotpointercapture
and lostpointercapture
events.
From a3b89c0df8a70ce51e7aa7f56dbbe96dbf2ee4b2 Mon Sep 17 00:00:00 2001
From: Philippe Le Hegaret
Date: Fri, 28 May 2021 16:02:33 -0400
Subject: [PATCH 10/10] DOM
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Co-authored-by: Marcos Cáceres
---
index.html | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/index.html b/index.html
index e2e1c89..17e47df 100644
--- a/index.html
+++ b/index.html
@@ -969,8 +969,7 @@ Coalesced events
that were coalesced into this event; otherwise it is an empty list.
The events in the coalesced event list will have increasing
- {{Event/timeStamp}}s
- ([[!WHATWG-DOM]]), so the first event will have the smallest {{Event/timeStamp}}.
+ {{Event/timeStamp}}s, so the first event will have the smallest {{Event/timeStamp}}.
<style>