You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Maurice Amsellem (JIRA)" <ji...@apache.org> on 2013/09/18 18:31:53 UTC

[jira] [Commented] (FLEX-33742) CalloutButtons inside another CalloutButton or Callout opened contents closeDropDown calls close the parent callout content

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

Maurice Amsellem commented on FLEX-33742:
-----------------------------------------

I have checked the source code, and the  bug seems to be in DropDownController.systemManager_mouseDownHandler(), which makes an incorrect assumption.
It assumes that if a mouse down event occurs OUTSIDE of the callout, then the callout should be closed.
This is true, unless the mouse down occurs INSIDE ANOTHER Callout, in which case, it should be ignored.
See code below:


{code}
DropDownController.as
/**
     *  @private
     *  Called when the systemManager receives a mouseDown event. This closes
     *  the dropDown if the target is outside of the dropDown. 
     */     
    mx_internal function systemManager_mouseDownHandler(event:Event):void
    {
        // stop here if mouse was down from being down on the open button
        if (mouseIsDown)
        {
            mouseIsDown = false;
            return;
        }

        if (!dropDown || 
            (dropDown && 
             (event.target == dropDown 
             || (dropDown is DisplayObjectContainer && 
                 !DisplayObjectContainer(dropDown).contains(DisplayObject(event.target))))))
        {
{code}
                
> CalloutButtons inside another CalloutButton or Callout opened contents closeDropDown calls close the parent callout content
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-33742
>                 URL: https://issues.apache.org/jira/browse/FLEX-33742
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Mobile: Callout / CalloutButton
>    Affects Versions: Apache Flex 4.10.0
>         Environment: Windows
>            Reporter: Carlos Velasco Blanco
>            Priority: Minor
>
> When using a callout button inside the callout content of a different callout button I am having an undesired effect.
> Calling the dropdown method of the child callout button (the one placed at the callout content) is closing its callout content (as desired) but also closing the parents callout content.
> CalloutButton instances are to be closed using the closeDropDown() method which is causing the problem. Calling it for one instance is closing all instances. I think it was programmed that way thinking there would never be 2 CalloutButton instances opened at a time, but It really happens when you use CalloutButtons inside the contents that are displayed when an instance of CalloutButton is opened.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira