Closed GoogleCodeExporter closed 9 years ago
I'm still looking into this but it either has something to do with the
TabNavigator
not doing the right thing wrt visibility or something to do with the fact that
the
showing/hiding of iframes is done in the iframe component's set visible
property. I
believe, although I need to confirm, that if an ancestor is shown/hidden,
children
may not have their visibility explicitly set. In other languages, I think to
get a
component's explicit visiblity you would just use the property, but if you
wanted to
get its state (which may be affected by an ancestor) you would call isVisible or
something like that. Not sure how this is handled in Flex though.
Original comment by alan.pla...@gmail.com
on 4 Nov 2008 at 8:42
Not sure if this is going to help your specific implementation, but if you
remove the
Canvas controls and allow the IFrames to be the only children / a direct child
of the
TabNavigator, the problem is resolved. Must be something about the way the
IFrame
traverses the view stack to accomplish the showing/hiding of the actual HTML
iframe;
I've had similar problems and took a bit of hacking to get it all dialed in
(still
not sure what my problem was exactly, or what I changed to fix it).
Original comment by dealingwith
on 4 Nov 2008 at 10:55
Oh, I remember one problem I am still having, I am using SuperTabNavigator from
FlexLib, which includes "close" buttons for each tab. When closing a
"background" tab
w/ an IFrame in it (a tab that is not the currently-viewed tab), it breaks the
IFrame
stuff fairly severely.
Original comment by dealingwith
on 4 Nov 2008 at 10:57
dealingwith - For your issue with closing tabs, check out this other issue that
I
logged. I think that's what you are seeing.
http://code.google.com/p/flex-iframe/issues/detail?id=1
I'll try removing the Canvas and see if that helps my tab selection issue.
Original comment by alan.pla...@gmail.com
on 4 Nov 2008 at 11:44
If you set creationPolicy="all" on the TabNavigator, that seems to resolve the
issue. When creationPolicy is the
default (auto), the TabNavigator creates only its immediate children when it
initializes. Their children (i.e. the
iframes inside the canvases) are not created until that tab is visited.
This would suggest that it's an issue with creation timing or order. I'm
investigating further
Original comment by ryan2...@gmail.com
on 5 Nov 2008 at 6:30
OK, I figured this one out -- the problem was with code that I added to iframe
to detect potential cross-site
scripting violations. This code uses the BrowserManager to find out the
application's domain when iframe runs
createChildren. When new iframes were getting created using the deferred auto
creationPolicy, they were
calling BrowserManager.initForHistoryManager() again which was causing
HistoryManager to re-set the
application's history state, including the selected tab of the TabNavigator.
I've fixed this so that initForHistoryManager should only ever get called once,
the first time the IFrame .
I will try to get an updated version to Alistair that has a couple of other
fixes as well for stuff I've run into. In
the meantime, you can fix it by hand:
1. Change
private var appHost:String
-- to --
private static var appHost:String;
2. Wrap the BrowserManager and appHost block in createChildren() in a check for
appHost being already set,
so it looks like this:
// Get the host info to check for cross-domain issues
if (!appHost)
{
BrowserManager.getInstance().initForHistoryManager();
var url:String = BrowserManager.getInstance().url;
appHost = URLUtil.getProtocol(url) + "://"
+ URLUtil.getServerNameWithPort(url);
}
Sorry 'bout that one. Hope that helps.
Ryan
Original comment by ryan2...@gmail.com
on 5 Nov 2008 at 8:10
Sweet! that seems to work. Thanks for looking into this so quickly.
Original comment by alan.pla...@gmail.com
on 5 Nov 2008 at 8:25
Closing this issue...
Original comment by ryan2...@gmail.com
on 10 Nov 2008 at 5:09
Original comment by Julien.N...@gmail.com
on 11 Oct 2009 at 12:20
Original issue reported on code.google.com by
alan.pla...@gmail.com
on 4 Nov 2008 at 8:39