Alex Harui wrote > On 10/26/16, 11:07 PM, "yishayw" < > yishayjobs@
> > wrote: > >>In flash doubleClick events are not dispatched unless >>InterActiveObject.doubleClickEnabled is set to true. In HTML there's no >>such >>property and dblclick is always dispatched. We'd like add >>doubleClickEnabled >>to FlexJS and were thinking of doing it in a bead. >> >>The question is how to implement it on the JS side. One idea is to add an >>event handler to dblclick with max priority and decide whether or not to >>stop event propagation. The problem is I don't see a way to add priorities >>to event handlers. >> >>Any ideas? > > IMO, it depends a bit on your goals. There are already some SWF-centric > beads. In fact, the simplest DisableBead mainly saves code in a SWF for > instances that don't need disabled behavior. On the JS side, I think it > just flips the HTMLElement's disabled property. But enable/disable is > also in a bead in order to allow for different visual effects. > > > Will all apps need double click events? Or maybe 80% of apps? Or is your > goal to suppress dblclick in certain scenarios on the JS side? If the > goal is to suppress, what kind of scenarios require that? > > One option is just to have UIBase set InterActiveObject.doubleClickEnabled > to true in the constructor so each UIBase has the same behavior on both > SWF and JS. I'm not sure what the costs are of turning that flag on on > the SWF side. Or does Flash eat the second click event? > > -Alex I already added doubleClickEnabled=true to UIBase, which seems in line with making FlexJS' behavior HTML like. In our app, we turn doubleClickEnabled for components on and off depending on whether or not they're editable. We could get around it by checking the target in the event handler. I was thinking that in general it could be nice to have an example of suppressing certain events in beads. The scenarios would be very similar to scenarios that require disabling all mouse events, which is what DisabledBead currently does. Sometimes there are a lot of event handlers on a single event and the simplest solution is to suppress the event rather than having all handlers check the target. -- View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-DoubleClickEnabledBead-tp56048p56056.html Sent from the Apache Flex Development mailing list archive at Nabble.com.