Event bubbling is to happen in the following way:

      Views shall have a boolean, 'bubbleParent', (readwrite) that indicates whether or not the view will bubble up events.

      Internally, views, at a class level, should provide a way to indicate which view is next to receive the event. NULL is a valid response, when the view is not connected, has no parent otherwise, or is not a view that bubbles.

      An event shall have a boolean, 'bubbles', that is set at creation time only, that indicates if the event will bubble or not. This is to allow custom events to also bubble as well.

      An event shall also have a boolean, 'cancelBubble', that starts false but can be set during event handling.

      As such, an event bubbles if the following is true:
      event.bubbles && !event.cancelBubble && view.bubbleParent && ((next view to get event) is not NULL or similar)

      NOTE that event bubbling happens after the fact. That is, the native handling (such as indicating highlight) have already happened before any event fires.

      ALSO NOTE that multiple events of different types are treated separately. That is, if the user lifting their finger triggers 'touchup', 'tap', and 'click' events, any actions done on the touchup event (such as setting cancelBubble) do not affect bubbling nor firing of either tap or click.

      By having the spec this open and not specific, we can implement this independent of specific event specs.

      Sub-tasks that are for each OS will happen after this spec is approved.


          Issue Links



              • Assignee:
                blainhamon Blain Hamon
                blainhamon Blain Hamon
              • Watchers:
                6 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    Sync status:
                    Last sent:

                    Git Integration