From ccb53867f47b5bfdce015e8caf757c2289905b9c Mon Sep 17 00:00:00 2001 From: Kristen Mills Date: Wed, 12 Feb 2020 17:49:41 -0800 Subject: [PATCH 1/2] Fix doc scrolling --- 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..cca7f2dd30c7e5 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) { // 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. From 0dc26267e46d690f1e7098c34c0e07a79c781104 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Thu, 13 Feb 2020 12:34:01 +0100 Subject: [PATCH 2/2] full revert --- 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 cca7f2dd30c7e5..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.