add maskClosable is false ESC close

This commit is contained in:
jljsj 2019-05-31 15:33:58 +08:00
parent 364e1624ea
commit 9ec4aaa9f4

View File

@ -105,8 +105,8 @@ class Drawer extends React.Component<DrawerProps & ConfigConsumerProps, IDrawerS
}
};
onMaskClick = (e: EventType) => {
if (!this.props.maskClosable) {
onMaskClick = (e: any) => {
if (!this.props.maskClosable && !e.keyCode) {
return;
}
this.close(e);