feat: improve hash target positioning upon initial navigation
This commit is contained in:
@@ -21,6 +21,9 @@ export default ({ app, route }) => {
|
||||
setTimeout(() => {
|
||||
const selector = decodeURIComponent(to.hash)
|
||||
const anchor = document.querySelector(selector)
|
||||
if (!anchor) {
|
||||
return
|
||||
}
|
||||
|
||||
if (anchor.tagName === 'CODE') {
|
||||
target = anchor.closest('tr')
|
||||
|
Reference in New Issue
Block a user