Files
codeg/src/components/overlay-scrollbars-init.tsx
xintaofei 0f7286b858 fix(frontend): prevent body OverlayScrollbar from intercepting message list scroll events
The body-level OverlayScrollbar (position: fixed, z-index: 99999) with
clickScroll and dragScroll enabled was capturing pointer events on the
scrollbar track, preventing the message list's native scrollbar from
receiving them. Disable both interactions on the body instance since it
does not need to scroll.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:39:31 +08:00

26 lines
511 B
TypeScript

"use client"
import { useEffect } from "react"
import "overlayscrollbars/overlayscrollbars.css"
import { useOverlayScrollbars } from "overlayscrollbars-react"
export function OverlayScrollbarsInit() {
const [init] = useOverlayScrollbars({
options: {
scrollbars: {
theme: "os-theme-codeg",
autoHide: "leave",
dragScroll: false,
},
overflow: { x: "hidden" },
},
defer: true,
})
useEffect(() => {
init(document.body)
}, [init])
return null
}