@@ -72,6 +72,7 @@ interface State {
7272 loadingStack : number ;
7373 toastMessages : ToastPropsWithID [ ] ;
7474 showContextualSaveBar : boolean ;
75+ scrollbarAlwaysVisible : boolean ;
7576}
7677
7778const APP_FRAME_MAIN = 'AppFrameMain' ;
@@ -88,6 +89,7 @@ class FrameInner extends PureComponent<CombinedProps, State> {
8889 loadingStack : 0 ,
8990 toastMessages : [ ] ,
9091 showContextualSaveBar : false ,
92+ scrollbarAlwaysVisible : false ,
9193 } ;
9294
9395 private contextualSaveBar : ContextualSaveBarProps | null = null ;
@@ -102,6 +104,7 @@ class FrameInner extends PureComponent<CombinedProps, State> {
102104 this . setGlobalRibbonRootProperty ( ) ;
103105 this . setOffset ( ) ;
104106 this . setBodyStyles ( ) ;
107+ this . setScrollbarAlwaysVisible ( ) ;
105108 }
106109
107110 componentDidUpdate ( prevProps : FrameProps ) {
@@ -253,6 +256,7 @@ class FrameInner extends PureComponent<CombinedProps, State> {
253256 topBar && styles . hasTopBar ,
254257 sidebar && styles . hasSidebar ,
255258 sidebar && hasDynamicTopBar && styles [ 'hasSidebar-TopBarAndReframe' ] ,
259+ this . state . scrollbarAlwaysVisible && styles . ScrollbarAlwaysVisible ,
256260 ) ;
257261
258262 const contextualSaveBarMarkup = this . props . dynamicTopBarAndReframe ? (
@@ -322,7 +326,11 @@ class FrameInner extends PureComponent<CombinedProps, State> {
322326 < Scrollable
323327 scrollbarWidth = "thin"
324328 horizontal = { false }
325- className = { styles . Scrollable }
329+ className = { classNames (
330+ styles . Scrollable ,
331+ this . state . scrollbarAlwaysVisible &&
332+ styles [ 'Scrollable-ScrollbarAlwaysVisible' ] ,
333+ ) }
326334 id = { APP_FRAME_SCROLLABLE }
327335 >
328336 < div
@@ -377,6 +385,17 @@ class FrameInner extends PureComponent<CombinedProps, State> {
377385 setRootProperty ( '--pc-frame-offset' , offset ) ;
378386 } ;
379387
388+ private setScrollbarAlwaysVisible = ( ) => {
389+ const scrollbarWidth = parseInt (
390+ document . documentElement . style . getPropertyValue (
391+ '--pc-app-provider-scrollbar-width' ,
392+ ) ,
393+ 10 ,
394+ ) ;
395+
396+ this . setState ( { scrollbarAlwaysVisible : scrollbarWidth > 0 } ) ;
397+ } ;
398+
380399 private setGlobalRibbonRootProperty = ( ) => {
381400 const { globalRibbonHeight} = this . state ;
382401 setRootProperty (
0 commit comments