Closed dfreedm closed 10 years ago
@sorvell PTAL
Here's an illustration for the behavior change:
<div id="a" on-tap="{{tap}}">
<div id="b" on-track="{{track}}"></div>
<div id="c" on-hold="{{hold}}"></div>
</div>
<div id="d" on-hold="{{hold}}"></div>
Before #36, a "tap" on #d
would emit a tap gesture, even though no ancestor of #d was listening for it.
After #36, the list of gestures to emit calculates what gestures are being listened for in the ancestors of node that received the "down".
In this example, any interaction with #c
will only make "hold" and "tap" gestures.
Important note: even with #36, a tap on #c
will dispatch the tap to #c
and #b
, even though the only listener for tap is #a
LGTM
This change calculates what gestures are being listening for in the event path, and saves that list per pointer.