@@ -93,7 +93,7 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
9393 } catch ( err ) { }
9494 this . passive = passiveSupported ? { passive : false } : false ;
9595 }
96- const { open, getContainer } = this . props ;
96+ const { open, getContainer, showMask } = this . props ;
9797 const container = getContainer && getContainer ( ) ;
9898 this . drawerId = `drawer_id_${ Number (
9999 ( Date . now ( ) + Math . random ( ) )
@@ -110,12 +110,14 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
110110 this . forceUpdate ( ( ) => {
111111 this . domFocus ( ) ;
112112 } ) ;
113- this . props . scrollLocker ?. lock ( ) ;
113+ if ( showMask ) {
114+ this . props . scrollLocker ?. lock ( ) ;
115+ }
114116 }
115117 }
116118
117119 public componentDidUpdate ( prevProps : IDrawerChildProps ) {
118- const { open, getContainer, scrollLocker } = this . props ;
120+ const { open, getContainer, scrollLocker, showMask } = this . props ;
119121 const container = getContainer && getContainer ( ) ;
120122 if ( open !== prevProps . open ) {
121123 if ( container && container . parentNode === document . body ) {
@@ -124,7 +126,9 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
124126 this . openLevelTransition ( ) ;
125127 if ( open ) {
126128 this . domFocus ( ) ;
127- scrollLocker ?. lock ( ) ;
129+ if ( showMask ) {
130+ scrollLocker ?. lock ( ) ;
131+ }
128132 } else {
129133 scrollLocker ?. unLock ( ) ;
130134 }
0 commit comments