diff --git a/toolkit/content/customizeToolbar.js b/toolkit/content/customizeToolbar.js index 2a51b7745c01..c5e0ddb7d487 100644 --- a/toolkit/content/customizeToolbar.js +++ b/toolkit/content/customizeToolbar.js @@ -100,9 +100,13 @@ function repositionDialog() { // Position the dialog touching the bottom of the toolbox and centered with // it. + var width; + if (document.documentElement.hasAttribute("width")) + width = document.documentElement.getAttribute("width"); + else + width = parseInt(document.documentElement.style.width); var screenX = gToolbox.boxObject.screenX - + ((gToolbox.boxObject.width - - parseInt(document.documentElement.style.width)) / 2); + + ((gToolbox.boxObject.width - width) / 2); var screenY = gToolbox.boxObject.screenY + gToolbox.boxObject.height; window.moveTo(screenX, screenY);