Skip to content

Commit 9f6143c

Browse files
Update apps/client/src/main.tsx
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent a869ad5 commit 9f6143c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/client/src/main.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ import { Frame } from "@/pages/Frame/Frame"
1010
import "@/components/Editor/init"
1111

1212
// Prevent bounce scrolling on document while allowing internal scroll
13-
preventBounceScroll()
13+
const cleanupBounceScroll = preventBounceScroll()
1414

15+
// Ensure bounce scroll listeners are cleaned up when the page unloads
16+
window.addEventListener("unload", cleanupBounceScroll)
1517
// Make sure we have a root element to mount the app
1618
const rootElement = document.getElementById("root")
1719
if (!rootElement) {

0 commit comments

Comments
 (0)