Phoenix LiveView Hooks: window scroll issues

If you open the browser’s dev console and manually run the command what happens?

Another idea: try calling it with a timeout and see if it makes a difference: setTimeout(() => { window.scrollTo(0,0) }, 1000)