@@ -93,7 +93,7 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
93
93
} catch ( err ) { }
94
94
this . passive = passiveSupported ? { passive : false } : false ;
95
95
}
96
- const { open, getContainer } = this . props ;
96
+ const { open, getContainer, showMask } = this . props ;
97
97
const container = getContainer && getContainer ( ) ;
98
98
this . drawerId = `drawer_id_${ Number (
99
99
( Date . now ( ) + Math . random ( ) )
@@ -110,12 +110,14 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
110
110
this . forceUpdate ( ( ) => {
111
111
this . domFocus ( ) ;
112
112
} ) ;
113
- this . props . scrollLocker ?. lock ( ) ;
113
+ if ( showMask ) {
114
+ this . props . scrollLocker ?. lock ( ) ;
115
+ }
114
116
}
115
117
}
116
118
117
119
public componentDidUpdate ( prevProps : IDrawerChildProps ) {
118
- const { open, getContainer, scrollLocker } = this . props ;
120
+ const { open, getContainer, scrollLocker, showMask } = this . props ;
119
121
const container = getContainer && getContainer ( ) ;
120
122
if ( open !== prevProps . open ) {
121
123
if ( container && container . parentNode === document . body ) {
@@ -124,7 +126,9 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
124
126
this . openLevelTransition ( ) ;
125
127
if ( open ) {
126
128
this . domFocus ( ) ;
127
- scrollLocker ?. lock ( ) ;
129
+ if ( showMask ) {
130
+ scrollLocker ?. lock ( ) ;
131
+ }
128
132
} else {
129
133
scrollLocker ?. unLock ( ) ;
130
134
}
0 commit comments