One of the following:
const scrollRestoration = history.scrollRestoration;
if (scrollRestoration === "manual") {
console.log(
"The location on the page is not restored, user will need to scroll manually.",
);
}
if (history.scrollRestoration) {
history.scrollRestoration = "manual";
}
Specification |
---|
Product helpscrollRestoration property of the History Instance propertiesRelated pages for History API |