flex-users / flex-iframe

IFrame component for Flex applications.
github.com/flex-users/flex-iframe
120 stars 63 forks source link

IFrames on non-selected viewstacks are visible on first load #103

Open traviscollins opened 13 years ago

traviscollins commented 13 years ago

IFrame components that are held in viewstacks that are not the default selected view stack are visibile at first load. Switching the viewstack selected index back and forth once properly hides the IFrame.

To re-create...

1) Create a simple view stack 2) Add a container with an iframe in the first child. 3) Add another contianer with an iframe in the second child. 4) Launch the view stack, and you'll see that the second child Iframe appears over the first child iframe.

This is caused by a logic error in the uppdateFrameVisibility method. There is no check of visibility executed before evaluation of that method on first load. Simply modifying checkDisplay's arguments to be optional, and then inserting an execution of that method into updateFrameVisibility fixes this issue.

I will submit a pull request with a proposed fix shortly.