Skip to content

Commit 962dfc4

Browse files
authored
fix: prevent scroll when drawer close and focus (#417)
1 parent b4472f7 commit 962dfc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Drawer.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const Drawer: React.FC<DrawerProps> = props => {
7070
lastActiveRef.current &&
7171
!panelRef.current?.contains(lastActiveRef.current)
7272
) {
73-
lastActiveRef.current?.focus();
73+
lastActiveRef.current?.focus({ preventScroll: true });
7474
}
7575
};
7676

0 commit comments

Comments
 (0)