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