flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Mclean (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34040) GroupBase incorrectly computes hasMouseListeners which breaks e.g. mouseEnabledWhereTransparent
Date Mon, 03 Mar 2014 00:25:20 GMT

    [ https://issues.apache.org/jira/browse/FLEX-34040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917640#comment-13917640

Justin Mclean commented on FLEX-34040:

I assume you saw this comment in the code? (GroupBase addEventListener)

        // This code below is not really accurate for two reasons:
        // 1) MouseEvents bubble so someone up the chain
        //    may be listening for this event, and we woudln't 
        //    detect it here.
        // 2) addEventListener()/removeEventListener() may be called 
        //    multiple times with the same handler and may have no 
        //    real effect on the component, but we're still incrementing
        //    and decrementing the mouseEventReferenceCount here
        //  Neither of these issues seem worth fixing as there aren't 
        //  really great fixes for them, so it's just something we will 
        //  document and live with for now.

> GroupBase incorrectly computes hasMouseListeners which breaks e.g. mouseEnabledWhereTransparent
> -----------------------------------------------------------------------------------------------
>                 Key: FLEX-34040
>                 URL: https://issues.apache.org/jira/browse/FLEX-34040
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: Group
>    Affects Versions: Apache Flex 4.11.0
>            Reporter: Borek Bernard
>              Labels: easytest
>         Attachments: Flex34040Demo.fxp
> The `GroupBase#hasMouseListeners` property is vital for things like dispatching mouse
events on transparent parts on the group, however, the current algo is incorrect - it just
increments a counter every time addEventListener() is called and decrements it when removeEventListener()
is called.
> That means that when I call addEventListener("click") and then removeEventListener("someOtherMouseEvent"),
the hasMouseListeners property will be false even though I have an active "click" listener.

This message was sent by Atlassian JIRA

View raw message