Skip to content

Commit

Permalink
fix: prevent scroll when drawer close and focus (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed May 27, 2023
1 parent b4472f7 commit 962dfc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const Drawer: React.FC<DrawerProps> = props => {
lastActiveRef.current &&
!panelRef.current?.contains(lastActiveRef.current)
) {
lastActiveRef.current?.focus();
lastActiveRef.current?.focus({ preventScroll: true });
}
};

Expand Down

0 comments on commit 962dfc4

Please sign in to comment.