File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const Drawer: React.FC<DrawerProps> = props => {
25
25
prefixCls,
26
26
afterOpenChange,
27
27
destroyOnClose,
28
+ mask,
28
29
} = props ;
29
30
30
31
const [ animatedVisible , setAnimatedVisible ] = React . useState ( false ) ;
@@ -57,7 +58,7 @@ const Drawer: React.FC<DrawerProps> = props => {
57
58
open = { open || forceRender || animatedVisible }
58
59
autoDestroy = { false }
59
60
getContainer = { getContainer }
60
- autoLock = { open || animatedVisible }
61
+ autoLock = { mask && ( open || animatedVisible ) }
61
62
>
62
63
< DrawerPopup { ...sharedDrawerProps } inline = { getContainer === false } />
63
64
</ Portal >
Original file line number Diff line number Diff line change @@ -131,7 +131,9 @@ describe('rc-drawer-menu', () => {
131
131
const drawer = document . querySelector ( '.rc-drawer' ) ;
132
132
expect ( drawer ) . toBeTruthy ( ) ;
133
133
expect ( document . body . contains ( drawer ) ) . toBeTruthy ( ) ;
134
- expect ( document . body . style . overflow ) . toBe ( '' ) ;
134
+ expect ( document . body ) . not . toHaveStyle ( {
135
+ overflowY : 'hidden' ,
136
+ } ) ;
135
137
unmount ( ) ;
136
138
} ) ;
137
139
You can’t perform that action at this time.
0 commit comments