This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24348 - pointerdown/pointerup/pointercancel on non-hover devices
Summary: pointerdown/pointerup/pointercancel on non-hover devices
Status: RESOLVED FIXED
Alias: None
Product: PointerEventsWG
Classification: Unclassified
Component: Pointer Events specification (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Jacob Rossi [MSFT]
QA Contact: Pointer Events Bugzilla list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-22 00:16 UTC by Patrick H. Lauke
Modified: 2014-01-24 00:00 UTC (History)
2 users (show)

See Also:


Attachments

Description Patrick H. Lauke 2014-01-22 00:16:54 UTC
In the current spec, pointerdown/pointerup/pointercancel on input devices that do not support hover MUST fire a pointerover/pointerout/pointerout (respectively, before in the first case and after in the other two cases). pointerenter/pointerleave should also be added.

Proposed changes:


- "5.2.2 The pointerdown event"

Currently: "For input devices that do not support hover, a user agent must also fire a pointerover event preceding the pointerdown event."

Change to: "For input devices that do not support hover, a user agent must also fire a pointerover and pointerenter event preceding the pointerdown event."


- "5.2.3 The pointerup event"

Currently: "For input devices that do not support hover, a user agent must also fire a pointerout event after firing the pointerup event."

Change to: "For input devices that do not support hover, a user agent must also fire a pointerout and pointerleave event after firing the pointerup event."


- "5.2.4 The pointercancel event"

Currently: "A user agent must also fire a pointerout event after firing the pointercancel event."

Change to: "A user agent must also fire a pointerout and pointerleave event after firing the pointercancel event."

[Incidentally, should there be something here about pointercancel generally not being applicable to input devices that DO support hover?]
Comment 1 Jacob Rossi [MSFT] 2014-01-22 22:52:36 UTC
Yep, looks like an editorial mistake when we added enter/leave.

Change:
https://dvcs.w3.org/hg/pointerevents/rev/95b152ce34eb
Comment 2 Daniel Freedman 2014-01-22 23:04:22 UTC
Minor ordering question: should the events be sent in {over,out} then {enter,leave} order, or {enter,leave} then {over,out} order?
Comment 3 Patrick H. Lauke 2014-01-23 01:08:51 UTC
(In reply to Daniel Freedman from comment #2)
> Minor ordering question: should the events be sent in {over,out} then
> {enter,leave} order, or {enter,leave} then {over,out} order?

If you mean the order in which the two events need to fired, I based it on what I observed in IE11 on a touch-enabled laptop, so

pointerover > pointerenter > pointerdown

pointerup > pointerout > pointerleave

in this order.
Comment 4 Jacob Rossi [MSFT] 2014-01-23 22:32:08 UTC
I can clarify that the ordering is important.  I'm also realizing that I should expand this change a bit to include mention of this behavior in the enter/leave definitions as well (over/out already make mention of it).
Comment 5 Jacob Rossi [MSFT] 2014-01-24 00:00:21 UTC
Let's see if this is better:
https://dvcs.w3.org/hg/pointerevents/rev/b2f89ea8ccf5 

I changed the language to be more explicit about the ordering (e.g. "dispatch a ____ event followed by a _____ event"). I also added links in the over, out, enter, leave definitions to the down/up/cancel definitions where this behavior is defined.