mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 08:58:00 +01:00
Fix accessing help topics on the current help page.
Only those beneath the current page position were accessible.
This commit is contained in:
@@ -6,7 +6,7 @@ function checkFragment()
|
|||||||
return;
|
return;
|
||||||
let elem = document.evaluate('//*[@class="tag" and text()="' + frag + '"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0);
|
let elem = document.evaluate('//*[@class="tag" and text()="' + frag + '"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null).snapshotItem(0);
|
||||||
if (elem)
|
if (elem)
|
||||||
window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context
|
window.content.scrollTo(0, window.content.scrollY + elem.getBoundingClientRect().top - 10); // 10px context
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("load", checkFragment, true);
|
document.addEventListener("load", checkFragment, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user