[#903] Page now scrolls to top on tab switch

This commit is contained in:
Rsl1122 2019-02-04 17:24:53 +02:00
parent 596e193e63
commit 9298f65a35
4 changed files with 4 additions and 0 deletions

View File

@ -637,6 +637,7 @@
if (slideIndex < 0) { if (slideIndex < 0) {
slideIndex = max slideIndex = max
} }
window.scrollTo(0, 0);
window.sessionStorage.setItem("NetworkSlideIndex", slideIndex); window.sessionStorage.setItem("NetworkSlideIndex", slideIndex);
var value = slideIndex * percent; var value = slideIndex * percent;
x.style.transition = "0.5s"; x.style.transition = "0.5s";

View File

@ -910,6 +910,7 @@
if (slideIndex < 0) { if (slideIndex < 0) {
slideIndex = max slideIndex = max
} }
window.scrollTo(0, 0);
window.sessionStorage.setItem("InspectSlideIndex", slideIndex); window.sessionStorage.setItem("InspectSlideIndex", slideIndex);
var value = slideIndex * percent; var value = slideIndex * percent;
x.style.transition = "0.5s"; x.style.transition = "0.5s";

View File

@ -331,6 +331,7 @@
if (slideIndex < 0) { if (slideIndex < 0) {
slideIndex = max slideIndex = max
} }
window.scrollTo(0, 0);
window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex); window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex);
var value = slideIndex * percent; var value = slideIndex * percent;
x.style.transition = "0.5s"; x.style.transition = "0.5s";

View File

@ -1542,6 +1542,7 @@
if (slideIndex < 0) { if (slideIndex < 0) {
slideIndex = max slideIndex = max
} }
window.scrollTo(0, 0);
window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex); window.sessionStorage.setItem("AnalysisSlideIndex", slideIndex);
var value = slideIndex * percent; var value = slideIndex * percent;
x.style.transition = "0.5s"; x.style.transition = "0.5s";