flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: Popup blocking issue
Date Fri, 22 May 2015 11:45:29 GMT

On May 22, 2015, at 2:29 PM, Jeffry Houser <jeffry@dot-com-it.com> wrote:

> 
> I think I'm missing some context

Probably. Details below:
> 
> On 5/22/2015 4:56 AM, Harbs wrote:
>> I have a spark DropDownList, and some of the items need to open a separate browser
window.
> 
> You mean when an item is selected in the Spark DropDownList you may want to open a separate
browser window.  Is that correct?  Last I checked, DropDownLists don't cause browser windows
to open on their own.
> 
> So, I suspect you have change listener on the Spark DropDownList; and in that change
listener you introspect the new selectd item and determine whether you need to open a new
window or not.  Is that correct?

Correct. Essentially, I have a navigateToUrl() invoked by a DropDownList close event. I believe
I tried “change" as well, but the navigateToUrl() is considered a popup by the browser and
blocked. I use navigateToUrl() in other places in the app on Button click events and it works
fine.

As specified in this document, the event needs to be “user initiated”. http://www.adobe.com/devnet/flashplayer/articles/fplayer10_uia_requirements.html

I have tried various workarounds such as this: http://apdevblog.com/problems-using-navigatetourl/
but it does not address the core problem here of the event not being “user initiated”.

> 
>> Ideally, the browser window should only be opened after some data is uploaded to
a server, but I’m willing to accept that that’s not an option.
> 
> How are you uploading it?  Generally, I would set some sort of flag in the change listener,
trigger the upload, and open the new window in the result handler of the upload, based on
the flag.

That’s more or less how I’m doing it (although I’m using Pure MVC), but as far as I
can tell, the COMPLETE event from the URLLoader that I’m using is not “user initiated”
either.

I can start trying to dispatch “click” events from the ItemRenderer in the DropDownList
and handle that, but I’d rather not do something that messy. My other option is to display
a popup when the upload is done, with a button which calls navigateToUrl() directly. There’s
pros and cons to that approach…

Harbs
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message