Skip to content

Commit

Permalink
use more recent API
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Apr 7, 2023
1 parent d2a25a8 commit 07d6683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppNavDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function PersistScroll(props) {

if (activeBox.top < 0 || activeBox.bottom + browserUrlPreviewHeight > window.innerHeight) {
// Scroll the least possible from the initial render, e.g. server-side, scrollTop = 0.
activeDrawerLink.scrollIntoView(false);
activeDrawerLink.scrollIntoView({ block: 'nearest' });
}

return () => {
Expand Down

0 comments on commit 07d6683

Please sign in to comment.