I think we can use setParentTarget to get bubbling to work reliably with custom events, but as Peter said, I don't think we want to set up parentTarget's just-in-case. Bubbling custom events is not a recommended practice as was mentioned in some other thread recently.
Imagine if you had a Panel as a child of a larger Panel. Bubbling a close event from the inner Panel could easily cause the outer Panel's close handler to also fire. My 2 cents, -Alex On 7/21/17, 6:22 AM, "Peter Ent" <p...@adobe.com.INVALID> wrote: >I needed events to bubble for the drag and drop work. While that was fine >for the Flash Player, the FlexJS/Google/Browser event mix didn't work. >Alex suggested I used setParentTarget on the event to work up the tree and >then the event would be dispatched at each level, thus mimicking bubbling. >I did this exclusively for drag events (see DragEvent class). > >Rather than putting that in as the solution for this, I took a simpler >approach. > >‹peter > >On 7/21/17, 2:35 AM, "Harbs" <harbs.li...@gmail.com> wrote: > >>Bubbling does not work very well in FlexJS in general. >> >>When you can rely on native browser event bubbling, it usually works >>okay, but custom events don¹t bubble. >> >>> On Jul 21, 2017, at 1:49 AM, Justin Mclean <jus...@classsoftware.com> >>>wrote: >>> >>> Hi, >>> >>>> The issue was that the TitleBar was dispatching "close" with >>>>bubbles=true. >>>> This works fine on SWF but not on the HTML platform without some extra >>>> work. So I just had PanelView intercept the event and dispatch one >>>>from >>>> its strand. >>> >>> Out of interest is this because of a missing cloneEvent method or that >>>it wasn¹t listening on a parent of the item that dispatched the bubbling >>>event or something else? >>> >>> Thanks, >>> Justin >> >