Merge pull request #1116 from ppwwyyxx/patch-2
Fix support for hashes that start with numberspull/1120/head
commit
e59fe64bb1
|
@ -52,7 +52,8 @@
|
|||
// jump to location.hash
|
||||
if (window.location.hash) {
|
||||
setTimeout(() => {
|
||||
document.querySelector(window.location.hash).scrollIntoView({ behavior: 'smooth' });
|
||||
// Use getElementById because querySelector does not support ids that start with numbers
|
||||
document.getElementById(window.location.hash.substring(1)).scrollIntoView({ behavior: 'smooth' });
|
||||
}, i * 100);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue