improve scroll position script
This commit is contained in:
parent
b7928a5255
commit
be5df9c22a
|
@ -522,7 +522,7 @@
|
||||||
" let currentUrl = window.location.pathname;" + Environment.NewLine +
|
" let currentUrl = window.location.pathname;" + Environment.NewLine +
|
||||||
" Blazor.addEventListener('enhancedload', () => {" + Environment.NewLine +
|
" Blazor.addEventListener('enhancedload', () => {" + Environment.NewLine +
|
||||||
" let newUrl = window.location.pathname;" + Environment.NewLine +
|
" let newUrl = window.location.pathname;" + Environment.NewLine +
|
||||||
" if (currentUrl != newUrl) {" + Environment.NewLine +
|
" if (currentUrl !== newUrl || window.location.hash === '') {" + Environment.NewLine +
|
||||||
" window.scrollTo({ top: 0, left: 0, behavior: 'instant' });" + Environment.NewLine +
|
" window.scrollTo({ top: 0, left: 0, behavior: 'instant' });" + Environment.NewLine +
|
||||||
" }" + Environment.NewLine +
|
" }" + Environment.NewLine +
|
||||||
" currentUrl = newUrl;" + Environment.NewLine +
|
" currentUrl = newUrl;" + Environment.NewLine +
|
||||||
|
|
Loading…
Reference in New Issue
Block a user