mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-16 23:22:30 +02:00
scroll to the proper location without the need of an offset
This commit is contained in:
1 parent
eaca2e379d
commit
297f8c2bf0
1 file changed
+2
-2
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user