Adding currentTarget to Touch objects

I've been working on implementing an onscreen custom keypad.  If the user
presses a key, I want them to be able to move to another key in case they
made a mistake.  I found it really hard to implement this using Touch
Events because a touches are bound to the element that they started on.

I'm using React and was able to patch it to add a 'currentTarget' property
to changedTouches, touches, and targetTouches.  The implementation uses
elementFromPoint.  See https://github.com/facebook/react/pull/6915 for
details.

I'm curious what other people think about adding a currentTarget property.

Kevin Barabash
Khan Academy

Received on Sunday, 29 May 2016 21:05:02 UTC