Flex 4 Spark ComboBox/DropDownList & Deep Linking Bug

A few weeks ago I converted a project to Flex 4 from the Flex 3 SDK. Overall it wasn't too terribly bad, even though the project is rather large. However, I am using deep linking to track the users position in the application, so that bookmarks can easily be created.

One of the things that readily became apparent is that deep linking, using the BrowserManager, breaks normal operation of Spark ComboBox and DropDownList components. If you attempt to perform a browsermanager.setFragment() in the change handler of one of these components, the dropdown list will not close properly and requires an additional click.

The workaround for this is to perform your setFragment call in a method called by callLater(). It's not an optimal workaround, especially if you need to do this in a lot of places in your app. But it works. 

I filed a bug for this with Adobe, and it was confirmed by them as a bug. The downside is that it has been closed and deferred to a later build. I figured I would post this as a quick point of reference for those of you who run into this. If you want to check out the bug report, see the Flex SDK Bug site. I hope this helps save someone else some time and hassle.

Tags: Flex, Flash & AS3

3 responses so far ↓

  • 1 Carly // Aug 3, 2010 at 9:45 PM

    Thankyou for the tip. I was having an issue with drop downs not closing as I was manipulating their data and selected index when an option was selected.
  • 2 Chris // Feb 4, 2011 at 1:02 PM

    I observed the same issue. My change handler does a bunch of things, but has nothing to do with BrowserManager. So, the bug is probably even more generic. Did not have time to narrow down the cause, but in any case the same fix (callLater) worked.
  • 3 flexmonkeypatches // Aug 26, 2011 at 9:52 AM

    Thanks for the tip....I thought I was crazy or writing bad code when I came across this behavior. Nope...not me. Flex SDK bug, Good old callLater. Reminds me of the as2 days when double doLater() solved a lot of problems.

Leave a Comment

Leave this field empty: