diff --git a/js/StaticSearch.js b/js/StaticSearch.js index e19b3437..6ea301f5 100644 --- a/js/StaticSearch.js +++ b/js/StaticSearch.js @@ -681,7 +681,7 @@ class StaticSearch{ else{ this.isSearching = false; } - window.scroll({ top: this.resultsDiv.offsetTop, behavior: "smooth" }); + this.resultsDiv.scrollIntoView({behavior: 'smooth', block: 'center'}); return result; }