[pointerevents] Order of the events in process pending pointer capture section

navidzolghadr has just created a new issue for 
https://github.com/w3c/pointerevents:

== Order of the events in process pending pointer capture section ==
@RByers, @mustaqahmed, @jacobrossi 

Looking at this section:

https://w3c.github.io/pointerevents/#process-pending-pointer-capture

- It seems weird that firing pointerleave/out happens after firing 
gotpointercapture. As the other places in the spec mentioned, if a 
pointer is captured by some element no other element should get those 
boundary transition events. The same thing happens for 
pointerenter/over.

- Also the conditions for when to send the out/leave/over/enter events
 only covers when the pointer is being captured from an un-captured 
state or vice versa. Meaning that at least one of the pending pointer 
capture target or pointer capture target should be clear for those 
transition events to be fired. I can imagine of some cases that this 
doesn't sound right when the element which has the capture set another
 element as the pointer capture.

This example shows both of the cases above:
https://output.jsbin.com/riyotu

1. Move the mouse onto the green div and press and keep the left key 
down.
2. Move the mouse a little bit in the green box (until you get more 
than ~10 pointermove) which then the pointer capture will be set to 
the blue div.
3. Move the mouse a little more until the blue div gets at least one 
pointer move.

Here is the list of events Edge prints:

1 green received pointermove 1
2 green received pointerover 1
3 green received pointerenter 1
4 green received pointerdown 1
======= Set Pointer Capture ======= 
5 green received gotpointercapture 1
6 green received pointermove 1
7 green received pointermove 1
8 green received pointermove 1
9 green received pointermove 1
10 green received pointermove 1
11 green received pointermove 1
12 green received pointermove 1
13 green received pointermove 1
14 green received pointermove 1
15 green received pointermove 1
16 green received pointermove 1
17 green received pointermove 1
======= Re-set Pointer Capture ======= 
18 green received lostpointercapture 1
19 blue received gotpointercapture 1
20 green received pointerout 1
21 green received pointerleave 1
22 blue received pointermove 1

Note that Edge does send pointerout/leave in steps 20 and 21 while 
neither of pending pointer capture target or pointer capture target 
were clear (i.e. pointer capture target was green div and pending 
pointer capture target was blue div) which spec doesn't cover in the 
conditions. Also I expected events in steps 20 and 21 happens at least
 before step 19 as per other parts of the spec. Further it feels more 
natural if they happen even before 18 but I don't have any arguments 
for this one.

p.s.: Note that step 1 also seems incorrect as pointermove happens 
before pointerover/enter but that is not part of this issue and it is 
probably just a bug in Edge.


Please view or discuss this issue at 
https://github.com/w3c/pointerevents/issues/39 using your GitHub 
account

Received on Tuesday, 8 March 2016 19:01:24 UTC