From 3e398fdbf3bd7b9146edbfcc55728481bf6c7439 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 2 Oct 2009 04:24:46 +1000 Subject: [PATCH] Fix last commit. --- common/content/hints.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/content/hints.js b/common/content/hints.js index 090c5c3c..c01bca14 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -276,9 +276,11 @@ function Hints() //{{{ // the containing block offsets with respect to the viewport function getContainerOffsets(doc) { + let body = doc.body || doc.documentElement; + if (/^(absolute|fixed|relative)$/.test(util.computedStyle(body)["position"])) { - let bodyRect = (doc.body || doc.documentElement).getClientRects()[0]; + let bodyRect = body.getClientRects()[0]; return [-bodyRect.left, -bodyRect.top]; } else