W3C home > Mailing lists > Public > public-pointer-events@w3.org > April to June 2013

Capturing Problems Example

From: Konstantinov Sergey <twirl@yandex-team.ru>
Date: Fri, 12 Apr 2013 18:57:32 +0400
To: Pointer Events WG <public-pointer-events@w3.org>
Message-Id: <5121365778652@webcorp1e.yandex-team.ru>
I made the test pages to demonstrate both capturing problem and the lack of standard functionality
http://konstantinov.cc/pe/doc.html
http://konstantinov.cc/pe/capt.html

Both pages demonstrate the same scenario:
- outer gray div is draggable
- inner gray div opens "context menu" on two-finger tap.

doc.html - example using document.addEventListener with capturing
capt.html - example using setPointerCapture.

You may note that:
(a) in the capturing example the context menu functionality is broken because the inner div never recieve 'pointerup' event;
(b) furthermore, there is a constant memory leak because we need to save the pointers position but never catch the 'pointerup' event.

-- 
Konstantinov Sergey
Yandex Maps API Development Team Lead
http://api.yandex.com/maps/
Received on Friday, 12 April 2013 14:58:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:20:25 UTC