I’m breaking this off into its own thread because it deserves a separate 
discussion.

After looking into how ROLL_OVER/ROLL_OUT events work, I see that it’s being 
handled pretty oddly. MouseEvent has a “installRollOverMixin” function which 
adds a mouseover event to window and fires ROLL_OVER and ROLL_OUT events for 
any elements which have listeners registered for them.

This seems horribly inefficient and I don’t understand why it’s necessary. It 
seems to me that mouseenter and rollOver (as well as mouseleave and rollOut) 
are analogous.

Am I missing something?

Thanks,
Harbs

> On Jul 11, 2017, at 10:48 AM, Harbs <harbs.li...@gmail.com> wrote:
> 
> No. I’m wrong.
> 
> First of all, it’s mouseenter rather than rollover, and it seems like it’s 
> fired more than mouseover.[1]
> https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter 
> <https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter>
> 
> That does beg the question though: Are the MouseEvent constants wrong for 
> Javascript?
> 
> 
>> On Jul 11, 2017, at 10:38 AM, Harbs <harbs.li...@gmail.com 
>> <mailto:harbs.li...@gmail.com>> wrote:
>> 
>> Shouldn’t the event be triggered by rollover rather than mouseover?
>> 
>> That seems like the issue to me…
>> 
>>> On Jul 11, 2017, at 10:13 AM, Alex Harui <aha...@adobe.com 
>>> <mailto:aha...@adobe.com>> wrote:
>>> 
>>> This seems like "just-in-case" code.  I could see that it might be needed
>>> in a different bead for Express though.
>>> 
>>> Without this change, is there an infinite loop somewhere?
>>> 
>>> Thanks,
>>> -Alex
>>> 
>>> On 7/10/17, 10:40 PM, "jmcl...@apache.org <mailto:jmcl...@apache.org>" 
>>> <jmcl...@apache.org <mailto:jmcl...@apache.org>> wrote:
>>> 
>>>> FLEX-35338 stop cursor from spinning / CPU from spiking
>>>> 
>>>> 
>>>> Project: 
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us 
>>>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us>
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Frepo&data=02%7C01%7C%7C8e2e2d5b3b3
>>>> 54f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6363534
>>>> 84318029070&sdata=32hEJB%2BTNsWKG8MY%2FdPr3d0RWT5Xr1tECWWpVTlM270%3D&reser
>>>> ved=0
>>>> Commit: 
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fcommit%2F549a10d8&data=02%7C01%7C%
>>>> 7C8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%
>>>> 7C0%7C636353484318029070&sdata=dcNhAGu8WspafZBZCRxb%2FN0z7D%2Fym3tuv%2BAaq
>>>> G280z0%3D&reserved=0
>>>> Tree: 
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Ftree%2F549a10d8&data=02%7C01%7C%7C
>>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>>> 0%7C636353484318029070&sdata=0p89CGQLSv0Pp0yscOBNjKRJ1HUMhHrDngm4xxixalc%3
>>>> D&reserved=0
>>>> Diff: 
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fdiff%2F549a10d8&data=02%7C01%7C%7C
>>>> 8e2e2d5b3b354f54848508d4c81f5768%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C
>>>> 0%7C636353484318029070&sdata=%2FclUp4scfr0z%2B%2FTPjBMlVw2kScADTcLPMwop5J4
>>>> 7cIU%3D&reserved=0
>>>> 
>>>> Branch: refs/heads/develop
>>>> Commit: 549a10d82da5835c61a2b1247b65f7bfbc2f9a36
>>>> Parents: 3891820
>>>> Author: Justin Mclean <jmcl...@apache.org>
>>>> Authored: Tue Jul 11 14:57:04 2017 +1000
>>>> Committer: Justin Mclean <jmcl...@apache.org>
>>>> Committed: Tue Jul 11 14:57:04 2017 +1000
>>>> 
>>>> ----------------------------------------------------------------------
>>>> .../main/flex/org/apache/flex/html/accessories/ToolTipBead.as   | 5 ++++-
>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>> ----------------------------------------------------------------------
>>>> 
>>>> 
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgit-wip-us
>>>> .apache.org%2Frepos%2Fasf%2Fflex-asjs%2Fblob%2F549a10d8%2Fframeworks%2Fpro
>>>> jects%2FBasic%2Fsrc%2Fmain%2Fflex%2Forg%2Fapache%2Fflex%2Fhtml%2Faccessori
>>>> es%2FToolTipBead.as&data=02%7C01%7C%7C8e2e2d5b3b354f54848508d4c81f5768%7Cf
>>>> a7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636353484318029070&sdata=hifp5T8
>>>> xFlL4zov22P5qOUYtZqrYuPqTqOJg2x4X5lo%3D&reserved=0
>>>> ----------------------------------------------------------------------
>>>> diff --git 
>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as 
>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> index 03ce21e..bdf0b68 100644
>>>> --- 
>>>> a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> +++ 
>>>> b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/accessories
>>>> /ToolTipBead.as
>>>> @@ -100,7 +100,10 @@ package org.apache.flex.html.accessories
>>>>             * @private
>>>>             */
>>>>            protected function rollOverHandler( event:MouseEvent ):void
>>>> -          {       
>>>> +          {
>>>> +                  if (!toolTip)
>>>> +                          return;
>>>> +
>>>> 
>>>> IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT,
>>>> rollOutHandler, false);
>>>> 
>>>>           var comp:IUIBase = _strand as IUIBase
>>>> 
>>> 
>> 
> 

Reply via email to