Skip to content

Commit

Permalink
[docs] Revert sidebar scrolling (mui#19678)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristenmills authored and EsoterikStare committed Feb 13, 2020
1 parent 3c9a03a commit 4f93797
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 4f93797

Please sign in to comment.