Bug 424651: customize toolbar sheet goes blank when the 'Show' dropdown menu is used, r=smaug, a=beltzner

git-svn-id: svn://10.0.0.236/trunk@248504 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com 2008-03-24 23:56:20 +00:00
parent beb8d60f7e
commit 84a6dcedae
2 changed files with 8 additions and 6 deletions

View File

@ -3212,16 +3212,22 @@ function BrowserCustomizeToolbar()
if (splitter)
splitter.parentNode.removeChild(splitter);
var customizeURL = "chrome://global/content/customizeToolbar.xul";
#ifdef TOOLBAR_CUSTOMIZATION_SHEET
var sheetFrame = document.getElementById("customizeToolbarSheetIFrame");
sheetFrame.hidden = false;
// The document might not have been loaded yet, if this is the first time
if (sheetFrame.getAttribute("src") != customizeURL)
sheetFrame.setAttribute("src", customizeURL);
// XXXmano: there's apparently no better way to get this when the iframe is
// hidden
var sheetWidth = sheetFrame.style.width.match(/([0-9]+)px/)[1];
document.getElementById("customizeToolbarSheetPopup")
.openPopup(getNavToolbox(), "after_start", (window.innerWidth - sheetWidth) / 2, 0);
#else
window.openDialog("chrome://global/content/customizeToolbar.xul",
window.openDialog(customizeURL,
"CustomizeToolbar",
"chrome,all,dependent",
getNavToolbox());

View File

@ -518,11 +518,7 @@
</vbox>
</hbox>
#ifdef TOOLBAR_CUSTOMIZATION_SHEET
<panel id="customizeToolbarSheetPopup" noautohide="true"
onpopupshowing="document.getElementById('customizeToolbarSheetIFrame')
.setAttribute('src', 'chrome://global/content/customizeToolbar.xul');"
onpopuphidden="document.getElementById('customizeToolbarSheetIFrame')
.setAttribute('src', 'about:blank');">
<panel id="customizeToolbarSheetPopup" noautohide="true">
<iframe id="customizeToolbarSheetIFrame"
style="&dialog.style;"
hidden="true"/>