You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by MichaPooh <ra...@yahoo.fr> on 2013/12/17 11:42:49 UTC

DropDownList in a Callout(Button) closes the Callout after selecting an item in the DropDownList

Hi

A DropDownList in a Callout(Button) calloutContent closes the Callout after
selecting an item in the DropDownList...
(using SDK4.11 in a web application - testing with FlashDebugPlayer 11.9)

This happens because the DropDownManager adds mouseDown triggers to the
systemManager which than closes the callout as well when the DropdownList
closes

The only workaround I found to prevent this is to get a reference to the
systemManager in my view which uses the Callout and override the
MouseEvent.MOUSE_DOWN and SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE and
stopImmediatePropagation() there..

this works, i can select an item without the Callout gets closed but the
downside is that the Callout stays open when i click somewhere outside the
calloutContent what normally would close it.
Re-clicking the calloutButton closes the Callout though..

But anyways, i find this solution not optimal because override the
systemMangers mouseDown and stopImmediatePropagation() there could have
other influences on other components in the view and i would have to check
with a flag if the Callout is actually open etc...

So my question is if anyone sees another workaround for this problem or if
this could be considered as a bug?



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/DropDownList-in-a-Callout-Button-closes-the-Callout-after-selecting-an-item-in-the-DropDownList-tp4204.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: DropDownList in a Callout(Button) closes the Callout after selecting an item in the DropDownList

Posted by MichaPooh <ra...@yahoo.fr>.
It's a matter of taste where you put the workaround...
For re-use in an application with many callouts the skin approach is
probably cleaner..

Anyway it is fixed in 4.12 RC



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/DropDownList-in-a-Callout-Button-closes-the-Callout-after-selecting-an-item-in-the-DropDownList-tp4204p5241.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: DropDownList in a Callout(Button) closes the Callout after selecting an item in the DropDownList

Posted by wthivierge <wi...@gmail.com>.
It is worth nothing that a better workaround then what was mentionned above
is to create a dropdownSkin where on the Scroller and the datagroup you
listen to mouseDown and stopImmediatePropagation



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/DropDownList-in-a-Callout-Button-closes-the-Callout-after-selecting-an-item-in-the-DropDownList-tp4204p5233.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: DropDownList in a Callout(Button) closes the Callout after selecting an item in the DropDownList

Posted by wthivierge <wi...@gmail.com>.
The problem here is that dropdownlist use a popupAnchor to display options.
The click is therefor now "owned" by the callout and thus callout is being
closed.

The callout function should include this possibility and this could be
considered a sdk bug as having options in a callout is highly probable and
this behavior is not desired. 

If you happens to have a scoll bar in the dropdown list as well a drag of it
will also close the callout making selection impossible 



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/DropDownList-in-a-Callout-Button-closes-the-Callout-after-selecting-an-item-in-the-DropDownList-tp4204p5231.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: DropDownList in a Callout(Button) closes the Callout after selecting an item in the DropDownList

Posted by Alex Harui <ah...@adobe.com>.
In theory the mouseDown handler should check if the mouse was in the
dropdown.  The owns() or contains() method is normally used to check that.

On 12/17/13 2:42 AM, "MichaPooh" <ra...@yahoo.fr> wrote:

>Hi
>
>A DropDownList in a Callout(Button) calloutContent closes the Callout
>after
>selecting an item in the DropDownList...
>(using SDK4.11 in a web application - testing with FlashDebugPlayer 11.9)
>
>This happens because the DropDownManager adds mouseDown triggers to the
>systemManager which than closes the callout as well when the DropdownList
>closes
>
>The only workaround I found to prevent this is to get a reference to the
>systemManager in my view which uses the Callout and override the
>MouseEvent.MOUSE_DOWN and SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE and
>stopImmediatePropagation() there..
>
>this works, i can select an item without the Callout gets closed but the
>downside is that the Callout stays open when i click somewhere outside the
>calloutContent what normally would close it.
>Re-clicking the calloutButton closes the Callout though..
>
>But anyways, i find this solution not optimal because override the
>systemMangers mouseDown and stopImmediatePropagation() there could have
>other influences on other components in the view and i would have to check
>with a flag if the Callout is actually open etc...
>
>So my question is if anyone sees another workaround for this problem or if
>this could be considered as a bug?
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/DropDownList-in-a-Callout-B
>utton-closes-the-Callout-after-selecting-an-item-in-the-DropDownList-tp420
>4.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.