From 4f9379785197182cc4cdf2f86279e27f9117a7a3 Mon Sep 17 00:00:00 2001 From: Kristen Mills Date: Thu, 13 Feb 2020 03:36:28 -0800 Subject: [PATCH] [docs] Revert sidebar scrolling (#19678) --- docs/src/modules/components/AppDrawer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/modules/components/AppDrawer.js b/docs/src/modules/components/AppDrawer.js index 5135d19664f03e..582a43ac48ed1f 100644 --- a/docs/src/modules/components/AppDrawer.js +++ b/docs/src/modules/components/AppDrawer.js @@ -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.