From 658095827b7533c635856358a080df69616da08c Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Mon, 29 May 2006 16:18:45 +0000 Subject: [PATCH] Fix customize toolbar dialog centering, patch by Dave Townsend , r=mconnor --- toolkit/content/customizeToolbar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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);