Changes between Version 2 and Version 3 of Ticket #13828, comment 6


Ignore:
Timestamp:
Sep 6, 2011, 12:54:19 PM (10 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13828, comment 6

    v2 v3  
    3838I would have preferred if each on() call above generated it's own private internal listeners for touchstart, touchmove, touchend, touchcancel.   However, it seems like the current design is necessary for the bubbling described above in !#1.   We need exactly one synthetic "tap" event to be propagated from the inner node, regardless of how many tap listeners have been registered to listen to tap.
    3939
    40 The code does seem quite complicated to me though, and I do question though whether all this complication is worth it just to support proper bubbling.   OTOH, for something like the dojo/gesture/tap code, I see how it's the same chunk of code that monitors touch events and fires either tap, tap.hold, or tap.doubletap, depending on what touch events occur, so it might be silly to run that code three times.   Anyway, I'd be interested to hear what others think.
     40The code does seem quite complicated to me though, and I do wonder whether this complication is worth it just to support proper bubbling.   OTOH, for something like the dojo/gesture/tap code, I see how it's the same chunk of code that monitors touch events and fires either tap, tap.hold, or tap.doubletap, depending on what touch events occur, so it might be silly to run that code three times just because an app was listening for tap, doubletap, and taphold.   Anyway, I'd be interested to hear what others think.
    4141
    4242----