ember-gestures
ember-gestures copied to clipboard
Nested components cause "re"-triggering of `recognizer` events
I guess I found a bug when nesting components. When each of the nested components declare a tap
recognizer-event, the event will get re-triggered (in a "parent-child" nesting at least 1 time).
I created a bug-reproduction repository if you want to see what I mean 👍
When using the tap
recognizer, I always get 2 events shortly after another (~1ms). Both of them show that they are "tap" events, the second one shows a tapCount
of 2
(tested on Windows with Chrome latest, IE11 and Apple iPad iOS 10.1.1 mobile Safari).
If I use the single-tap
recognizer instead of the tap
recognizer everything works like expected. Why?
I'm experiencing a similar issue. I had an outer component using tap
and an inner component using tap doubleTap
. A tap
or a click
on an element in the inner component triggers the action twice (tried bubbles=false, same thing).
Removing tap
from my inner component fixes the issue, but seems to conflict with using doubleTap
on the outer component.