2
0
Adam 1 сар өмнө
parent
commit
fd4d3094bf

+ 4 - 0
packages/app/src/pages/session/use-session-hash-scroll.ts

@@ -168,6 +168,10 @@ export const useSessionHashScroll = (input: {
   })
 
   onMount(() => {
+    if (typeof window !== "undefined" && "scrollRestoration" in window.history) {
+      window.history.scrollRestoration = "manual"
+    }
+
     const handler = () => {
       if (!input.sessionID() || !input.messagesReady()) return
       requestAnimationFrame(() => applyHash("auto"))