mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 12:57:58 +01:00
scroll to the proper location without the need of an offset
This commit is contained in:
@@ -219,9 +219,9 @@ function help(section, easter)
|
|||||||
echoerr("E149: Sorry, no help for " + section);
|
echoerr("E149: Sorry, no help for " + section);
|
||||||
return;
|
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)
|
// 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