We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61bf99d commit 4bc0fdbCopy full SHA for 4bc0fdb
src/index.js
@@ -19,14 +19,14 @@ function reset() {
19
function getElAndScroll() {
20
let element = null;
21
if (hashFragment === '#') {
22
- element = document.body;
+ element = document.documentElement;
23
} else {
24
// check for element with matching id before assume '#top' is the top of the document
25
// see https://html.spec.whatwg.org/multipage/browsing-the-web.html#target-element
26
const id = hashFragment.replace('#', '');
27
element = document.getElementById(id);
28
if (element === null && hashFragment === '#top') {
29
30
}
31
32
0 commit comments