Can't you just avoid calling openPopup until the page is loaded, and
avoid messing with the panel's "hidden" state completely?

Gavin

On Thu, May 16, 2013 at 8:27 AM, Matthew Gertner
<matt...@salsitasoft.com> wrote:
> I have a toolbar button that displays a XUL panel when pressed. The panel 
> contains an iframe into which an HTML page is loaded. To avoid "flicker", I'd 
> like to defer display of the panel until the HTML page has finished loading 
> (DOMContentLoaded).
>
> I tried setting the panel's hidden property to true in the popupshowing 
> handler and then setting it back to true when the iframe has finished 
> loading. The DOMContentLoaded handler for the iframe is called, but the panel 
> remains invisible even after setting hidden back to false. The state of the 
> panel is 'closed' at this point.
>
> It seems like the panel is automatically being closed when its hidden 
> property is set to true. (The same happens when I set style.display to 'none' 
> or collapsed to true). I nosed around the source code a bit but ended it 
> quickly in the bowels of nsBoxObject.cpp. Before I start debugging the box 
> object code, does anyone have any insights into why setting the hidden 
> property of the panel's XUL element to true causes it to be closed (and thus 
> remain invisible even when hidden is set back to false)?
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to