ember-gestures icon indicating copy to clipboard operation
ember-gestures copied to clipboard

Nested components cause "re"-triggering of `recognizer` events

Open herom opened this issue 8 years ago • 2 comments

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 👍

herom avatar Dec 13 '16 10:12 herom

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?

herom avatar Dec 14 '16 09:12 herom

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.

jdurand avatar Jul 26 '17 20:07 jdurand