1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 10:47:57 +01:00

scroll to the proper location without the need of an offset

This commit is contained in:
Viktor Kojouharov
2007-05-01 15:31:06 +00:00
parent eaca2e379d
commit 297f8c2bf0

View File

@@ -219,9 +219,9 @@ function help(section, easter)
echoerr("E149: Sorry, no help for " + section);
return;
}
var pos = cumulativeOffset(element);
var pos = cumulativeOffset(element.parentNode);
// horizontal offset is annyoing, set it to 0 (use pos[0] if you want horizontal offset)
window.content.scrollTo(0, pos[1] - 50); // 50 pixel context lines
window.content.scrollTo(0, pos[1]);
}
}