mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 18:27:57 +01:00
Fix last commit.
This commit is contained in:
@@ -276,9 +276,11 @@ function Hints() //{{{
|
|||||||
// the containing block offsets with respect to the viewport
|
// the containing block offsets with respect to the viewport
|
||||||
function getContainerOffsets(doc)
|
function getContainerOffsets(doc)
|
||||||
{
|
{
|
||||||
|
let body = doc.body || doc.documentElement;
|
||||||
|
|
||||||
if (/^(absolute|fixed|relative)$/.test(util.computedStyle(body)["position"]))
|
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];
|
return [-bodyRect.left, -bodyRect.top];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user