Re: Amazing set/releasePointerCapture. Part two.

Oops, I didn't send this to the list.

On 09/28/2014 03:07 PM, Olli Pettay wrote:
> On 09/26/2014 07:32 PM, Maksim Lebedev wrote:
>> Hi folks.
>>
>> Unfortunately, I didn't find any discussions about
>> "set/releasePointerCapture. Part one" And would like to provide one
>> else non-obvious case.
>>
>> function TargetOnPointerDown(event) {
>>    target.setPointerCapture(event.pointerId);
>> }
>> function TargetOnGotPointerCapture(event) {
>>    target.releasePointerCapture(event.pointerId);
>> }
>> function TargetOnLostPointerCapture(event) {
>>    target.setPointerCapture(event.pointerId);
>> }
>>
>> User puts down mouse on target and then moves around.
>> After pointerdown, browser tried to send pointermove event. But:
>> According point 5.2.1 in specification gotpointercapture should be
>> fired before any other pointer events.
>> Browser send gotpointercapture and in this place releasePointerCapture
>> was called.
>> According point 5.2.12 in specification lostpointercapture should be
>> fired before other pointer events too.
>> Browser send lostpointercapture and in this place setPointerCapture was called.
>>
>> When user receive pointermove event? Looks like, in this test case we have loop.
>
> What loop? you don't have a listener pointermove. pointermove should happen after lostpointercapture,
> and if the spec doesn't say so, it has a bug.
>
>
>
> -Olli
>
>
>>
>> Thanks, Maksim Lebedev.
>>
>
>

Received on Monday, 6 October 2014 14:56:02 UTC