flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com.INVALID>
Subject Re: [FlexJS] stopImmediatePropagation
Date Thu, 20 Jul 2017 07:59:02 GMT
I think the FlexJS browser event has logic that, when you access the
target, it checks for a flexjs_wrapper property.  I would expect problems
if MouseEvent and KeyboardEvent don't have the same way of finding the
element wrapper.


On 7/20/17, 12:15 AM, "Harbs" <harbs.lists@gmail.com> wrote:

>Yes. This appears to be it. I did not step through the code, but
>re-adding in wrappedEvent.stopPropagation(); seems to resolve the issues
>I was seeing.
>stopImmediatePropogation() probably does nothing at this point unless
>event listeners were added directly to HTML elements.
>Either way, my code changes in the browser-event branch dispatch
>MouseEvents and KeyboardEvents rather than BrowserEvents unless the goog
>BrowserEvent is some other type (such as TouchEvent).
>I’m ready to merging it in, but I’m going to wait until I get feedback on
>whether these changes are good or bad.
>One day it might not be a bad idea to patch (or rewrite) the goog Event
>code, but I have bigger fish to fry at this point.
>> On Jul 20, 2017, at 3:30 AM, Alex Harui <aharui@adobe.com.INVALID>
>> I haven't had time to dig into it, but IIRC, because we are using Google
>> Closure Events, stopImmediatePropagation will have no effect on what
>> listeners Google will call.  If the underlying DOM event does support
>> stopImmediatePropagation then it will stop other listeners on that DOM
>> object, but Google's addEventListener calls have built their own
>> of who to call.  Did you step through the code after
>> stopImmediatePropagation to see if Google kept running the loop on the
>> listeners?
>> Throwing an error in stopImmediatePropagation is definitely a hack and
>> probably only works if it is the last line of a handler, but I think at
>> the time I couldn't find another way.
>> One way, would be to modify Google Closure Events and truly support
>> stopImmediatePropagation.  I'm not convinced the other checkins I saw
>> would stop Google's code from calling additional listeners on the same
>> target.
>> HTH,
>> -Alex
>> On 7/19/17, 2:20 PM, "Harbs" <harbs.lists@gmail.com
>><mailto:harbs.lists@gmail.com>> wrote:
>>> Yes. MDL does not seem to be a problem.
>>> I just committed some more changes which makes my changes seem to work,
>>> but I must be missing something. MouseEvents seem to work as well as
>>> BrowserEvents. With KeyboardEvents, I’m getting mixed results. For some
>>> reason, I seem to be losing focus more easily with the KeyboardEvent
>>> change than with BrowserEvents.
>>> I don’t know why.
>>> I’m going to leave the browser-event branch until I either figure it
>>> or get some feedback on this…
>>>> On Jul 19, 2017, at 3:25 PM, piotrz <piotrzarzycki21@gmail.com> wrote:
>>>> Yishay, Harbs,
>>>> Are you using MDL in your project - does all events are working after
>>>> changes ? I mean click on controls like switch, new drop down list
>>>> can
>>>> check it in MDLExample app)
>>>> Thanks,
>>>> Piotr
>>>> -----
>>>> Apache Flex PMC
>>>> piotrzarzycki21@gmail.com
>>>> --
>>>> View this message in context:
>>>> ex-development.2333347.n4.nabble.com
>>>> 5f8d4vz2ti393hVFtm7Ao3NzM0gabMJKh6w%3D&reserved=0
>>>> Sent from the Apache Flex Development mailing list archive at
>>>> Nabble.com 

View raw message