Skip to content

Commit

Permalink
[docs] Revert sidebar scrolling (#19678)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristenmills authored Feb 13, 2020
1 parent 5faba4b commit 01b8b09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function PersistScroll(props) {

const activeBox = activeElement.getBoundingClientRect();

if (savedScrollTop !== null || activeBox.top < savedScrollTop) {
if (savedScrollTop === null || activeBox.top - savedScrollTop < 0) {
// Center the selected item in the list container.
activeElement.scrollIntoView();
// Fix a Chrome issue, reset the tabbable ring back to the top of the document.
Expand Down

0 comments on commit 01b8b09

Please sign in to comment.