You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Borek Bernard (JIRA)" <ji...@apache.org> on 2014/03/03 01:19:21 UTC
[jira] [Comment Edited] (FLEX-34040) GroupBase incorrectly computes
hasMouseListeners which breaks e.g. mouseEnabledWhereTransparent
[ https://issues.apache.org/jira/browse/FLEX-34040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917638#comment-13917638 ]
Borek Bernard edited comment on FLEX-34040 at 3/3/14 12:18 AM:
---------------------------------------------------------------
I encountered this bug in an application where my component wasn't in a complete control of all of the listeners - they were added dynamically by various parts of the application. I was just able to ensure that there is at least one click handler in which case the click handler should fire and it didn't. Just having a single counter for all the possible mouse events is a quick and dirty implementation, IMO, not a bullet-proof one.
was (Author: borekb):
I encountered this bug in an application where my component wasn't in a complete control of all of the listeners - they were added dynamically by various parts of the application. I was just able to ensure that there is at least one click handler in which case the click handler should fire and it didn't. Just having a single counter for all the possible mouse events is a quick and dirty implementation, IMO, not a correct one.
> 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
(v6.2#6252)