Re: [FlexJS] Bubbling Problem

2016-11-27 Thread yishayw
I've pushed a workaround that adds a new prop to MouseEvent: targetBeforeBubbling. It's not pretty but it helps get the correct screenX and clientX values, which is important in our app. Feel free to come up with a better solution... -- View this message in context: http://apache-flex-develop

Re: [FlexJS] Bubbling Problem

2016-11-23 Thread yishayw
MouseEvents don't bubble well wither on the SWF side. The target is mistaken for the forwarder. I filed a bug here [1] This is a problem for us in our app. [1]https://issues.apache.org/jira/browse/FLEX-35185 -- View this message in context: http://apache-flex-development.247.n4.nabble.

Re: [FlexJS] Bubbling Problem

2016-09-06 Thread Josh Tynjala
This bubbling issue where something deep in this display list unexpectedly called a listener at a much higher level that wasn't expecting a different event type or target annoyed me surprisingly frequently back in the day. Touch/mouse events are perfect candidates for bubbling because you are actua

Re: [FlexJS] Bubbling Problem

2016-09-06 Thread Alex Harui
On 9/6/16, 1:38 AM, "Harbs" wrote: >I don’t understand what you mean. > >It seems to me that bubbling is functionality that users would expect and >implementing bubbling should have very little overhead. Yes, people misused (IMO) bubbling quite frequently in existing Flex code. It is very tempt

Re: [FlexJS] Bubbling Problem

2016-09-06 Thread Harbs
I don’t understand what you mean. It seems to me that bubbling is functionality that users would expect and implementing bubbling should have very little overhead. On Sep 6, 2016, at 12:12 AM, Alex Harui wrote: > IMO, bubbling is only for interactive events. When you > bubble an event, the ev

Re: [FlexJS] Bubbling Problem

2016-09-05 Thread Alex Harui
On 9/5/16, 8:35 AM, "yishayw" wrote: >I tried adding > > (c as > ElementWrapper).setParentEventTarget(this); I think it would be: (c as ElementWrapper).setParentEventTarget(this.parent) Still, though, we should also change Panel to use best practices an

Re: [FlexJS] Bubbling Problem

2016-09-05 Thread yishayw
I tried adding (c as ElementWrapper).setParentEventTarget(this); in UIBase.addChild() but that crashed my test app with an endless recursion. For future reference, I think the problem is that in this piece of code: goog.events.EventTarget.prototype.dispatchEven

Re: [FlexJS] Bubbling Problem

2016-09-05 Thread Alex Harui
er 5, 2016 10:10 AM To: Alex Harui<mailto:aha...@adobe.com>; dev@flex.apache.org<mailto:dev@flex.apache.org> Subject: RE: [FlexJS] Bubbling Problem In develop it works on SWF, but not on JS. In sprite-refactor it fails in both. From: Alex Harui<mailto:aha...@adobe.com> Sent: Sunda

RE: [FlexJS] Bubbling Problem

2016-09-05 Thread Yishay Weiss
om>; dev@flex.apache.org<mailto:dev@flex.apache.org> Subject: RE: [FlexJS] Bubbling Problem In develop it works on SWF, but not on JS. In sprite-refactor it fails in both. From: Alex Harui<mailto:aha...@adobe.com> Sent: Sunday, September 4, 2016 5:23 PM To: dev@flex.apache.org<

RE: [FlexJS] Bubbling Problem

2016-09-05 Thread Yishay Weiss
In develop it works on SWF, but not on JS. In sprite-refactor it fails in both. From: Alex Harui<mailto:aha...@adobe.com> Sent: Sunday, September 4, 2016 5:23 PM To: dev@flex.apache.org<mailto:dev@flex.apache.org> Subject: Re: [FlexJS] Bubbling Problem It doesn't work on

Re: [FlexJS] Bubbling Problem

2016-09-04 Thread Alex Harui
It doesn't work on either SWF or JS? I've not done much testing on either, but I'd be surprised if it failed in the develop branch on SWF. -Alex On 9/4/16, 1:59 AM, "yishayw" wrote: >https://paste.apache.org/ORA4 > >In this simple example bubbling isn't working. Am I doing anything wrong? >I >