From 3fb4114461d1d62ba562f40043988103a22d1937 Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Sat, 9 May 2020 09:43:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E6=88=90=E6=8D=95=E8=8E=B7=E6=97=B6?= =?UTF-8?q?=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Drawer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Drawer.tsx b/src/components/Drawer.tsx index 8a1b8c29a..7d68ec64f 100644 --- a/src/components/Drawer.tsx +++ b/src/components/Drawer.tsx @@ -69,14 +69,14 @@ export class Drawer extends React.Component { if (this.props.show) { this.handleEntered(); } - document.body.addEventListener('click', this.handleRootClick); + document.body.addEventListener('click', this.handleRootClick, true); } componentWillUnmount() { if (this.props.show) { this.handleExited(); } - document.body.removeEventListener('click', this.handleRootClick); + document.body.removeEventListener('click', this.handleRootClick, true); } contentRef = (ref: any) => (this.contentDom = ref);