@@ -364,7 +364,7 @@ module ResultPane = {
364364 ~focusedRowCol : option <(int , int )>= ?,
365365 ~result : FinalResult .t ,
366366 ) =>
367- <div className = "pt-4 bg-0 overflow-y-auto" >
367+ <div className = "pt-4 bg-0 overflow-y-auto playground-scrollbar " >
368368 <div className = "flex items-center text-16 font-medium px-4" >
369369 <div className = "pr-4" > {renderTitle (result )} </div >
370370 </div >
@@ -765,7 +765,7 @@ module WarningFlagsWidget = {
765765 Option .map (suggestions , elements =>
766766 <div
767767 ref = {ReactDOM .Ref .domRef ((Obj .magic (listboxRef ): React .ref <Nullable .t <Dom .element >>))}
768- className = "p-2 absolute overflow-auto z-50 border-b rounded border-l border-r block w-full bg-gray-100 max-h-60"
768+ className = "p-2 absolute overflow-auto playground-scrollbar z-50 border-b rounded border-l border-r block w-full bg-gray-100 max-h-60"
769769 >
770770 elements
771771 </div >
@@ -1523,6 +1523,12 @@ let make = (~bundleBaseUrl: string, ~versions: array<string>) => {
15231523 let (searchParams , _ ) = ReactRouter .useSearchParams ()
15241524 let containerRef = React .useRef (Nullable .null )
15251525 let editorRef : React .ref <option <CodeMirror .editorInstance >> = React .useRef (None )
1526+ let (_ , setScrollLock ) = ScrollLockContext .useScrollLock ()
1527+
1528+ React .useEffect (() => {
1529+ setScrollLock (_ => true )
1530+ None
1531+ }, [])
15261532
15271533 let versions =
15281534 versions
@@ -1990,7 +1996,7 @@ let make = (~bundleBaseUrl: string, ~versions: array<string>) => {
19901996 <button key = {Int .toString (i )} onClick className disabled > {title } </button >
19911997 })
19921998
1993- <main className = {"flex flex-col bg-gray-100 text-gray-40 text-14 overflow-scroll mt-16" }>
1999+ <main className = {"flex flex-col bg-gray-100 text-gray-40 text-14 mt-16" }>
19942000 <ControlPanel
19952001 actionIndicatorKey = {Int .toString (actionCount )}
19962002 state = compilerState
@@ -2005,9 +2011,9 @@ let make = (~bundleBaseUrl: string, ~versions: array<string>) => {
20052011 // Left Panel
20062012 <div
20072013 ref = {ReactDOM .Ref .domRef ((Obj .magic (leftPanelRef ): React .ref <Nullable .t <Dom .element >>))}
2008- className = {` overflow-scroll ${layout == Column ? "h-2/4" : "h-full!" } ${layout == Column
2009- ? "w-full "
2010- : "w-[50%]" }` }
2014+ className = {` overflow-scroll playground-scrollbar ${layout == Column
2015+ ? "h-2/4 "
2016+ : "h-full!" } ${layout == Column ? "w-full" : " w-[50%]" }` }
20112017 >
20122018 <div
20132019 className = "bg-gray-100 h-full"
@@ -2042,7 +2048,7 @@ let make = (~bundleBaseUrl: string, ~versions: array<string>) => {
20422048 </div >
20432049 <div
20442050 ref = {ReactDOM .Ref .domRef ((Obj .magic (subPanelRef ): React .ref <Nullable .t <Dom .element >>))}
2045- className = "overflow-auto"
2051+ className = "overflow-auto playground-scrollbar "
20462052 >
20472053 <OutputPanel
20482054 currentTab compilerDispatch compilerState editorCode keyMapState = {(keyMap , setKeyMap )}
0 commit comments