Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: retain scroll position when going back #1030

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
7 changes: 0 additions & 7 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
exports.shouldUpdateScroll = ({ routerProps: { location } }) => {
if (location.hash === "") {
window.scrollTo(0, 0);
document.scrollingElement.scrollTop = 0;
}
return false;
};
8 changes: 4 additions & 4 deletions src/scss/custom.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
$enable-smooth-scroll: false; // xxx forced to disable default BI behaviour testing
// $enable-smooth-scroll: false; // xxx forced to disable default BI behaviour testing

:root {
scroll-behavior: auto !important;
}
// :root {
// scroll-behavior: auto !important;
// }

p, .content ul {
max-width: 75ch;
Expand Down
Loading