I was also looking for a solution for the mentioned problem and I delved into the code of google notebook and find out the following useful code snippet, it may also be helpful to you (they are using the window.open hack as mentioned) :
//their positioning code for the newly opened window function positionGUI(){ var win=window; var extraY=win.document.getElementById("status-bar").boxObject.height+win.outerWidth-win.innerWidth; var extraX=20; var candidateX=win.screenX+win.outerWidth-ethsms_gui_win.outerWidth-extraX; var candidateY=win.screenY+win.outerHeight-ethsms_gui_win.outerHeight-extraY;
/* for opening and closing the window */ function toggleETHSmsGUI(){ if( ethsms_gui_win == null ){ //the parameters that they are using for opening a window var features = ["chrome","resizable=no","dependent","alwaysRaised","titlebar=no"].join(",") ethsms_gui_win = window.open("chrome://ethsms/content/ethsms_gui.xul", "ethsms_gui", features); ethsms_gui_win.innerWidth = 300; ethsms_gui_win.innerHeight = 150; //now position the window like the google notebook window positionGUI(); } else { ethsms_gui_win.close(); ethsms_gui_win = null; } }
Yup, I've spent a bunch of time looking over what they are doing. A few extra things to note that make doing this more of a pain then it appears. The method you described only works on windows. window styles like alwaysRaised are not supported on the mac (or linux). However, it appears that on osx you can modify the zindex of the iframe and bring it up above the tab when you change tabs. I was hoping this method would work on both platforms, since this would also get around the issue that flash elements that are under your iframe popup will show through when they update. This means that if you want to do this everywhere you have to have two different implementations for things like loading/hiding/etc the modal.
In summary:
* Mac has a bug with flash elements showing through our iframe popups
* Mac os doesn't support certain window styles like alwaysRaised (not so much a bug as a support issue).
* Windows doesn't let us bring our iframe to the top
It's years since your question. However, if anyone has a similar problem, try to Firefox's elements <tabbox>, <tabs>, <tab>, <tabpanels> and <tabpanel>.
mozillaZine is an independent Mozilla community and advocacy site. We're not affiliated or endorsed by the Mozilla Corporation but we love them just the same.