From 962dfc4783f1b205156319fb7abb1ac06960cff6 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 27 May 2023 18:12:19 +0800 Subject: [PATCH] fix: prevent scroll when drawer close and focus (#417) --- src/Drawer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drawer.tsx b/src/Drawer.tsx index 2d92697..a87985f 100644 --- a/src/Drawer.tsx +++ b/src/Drawer.tsx @@ -70,7 +70,7 @@ const Drawer: React.FC = props => { lastActiveRef.current && !panelRef.current?.contains(lastActiveRef.current) ) { - lastActiveRef.current?.focus(); + lastActiveRef.current?.focus({ preventScroll: true }); } };