When I am in the footer and submit the form, it redirects to another page but it automatically srcolls to the footer
Now I want it not to scroll, is there any way? I tried using window.scrollToTop but it doesn't work, it still scrolls to the bottom then to the top
P粉8771147982023-09-16 00:26:39
I believe this only happens in Chrome!
Can you try adding the following auto-scroll limit in the head tag?
<script> window.history.scrollRestoration = 'manual'; </script>
Setting to manual value will not automatically scroll on page load/reload.
refer to: https://developer.mozilla.org/en-US/docs/Web/API/History/scrollRestoration