Fix scroll to top

This commit is contained in:
Stephan Porada 2020-11-03 11:46:37 +01:00
parent 5343d1b06e
commit b1509c3f6a
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ function scrollToTop(scrollToElementSelector, triggerElementSelector) {
scrolltoTopTrigger.onclick = () => { scrolltoTopTrigger.onclick = () => {
scrollToThis.scrollIntoView({ scrollToThis.scrollIntoView({
behavior: 'smooth', behavior: 'smooth',
block: 'end', block: 'start',
inline: 'nearest' inline: 'nearest'
}); });
}; };

View File

@ -339,7 +339,7 @@ document.addEventListener("DOMContentLoaded", () => {
client.query(results.data.query); client.query(results.data.query);
}); });
// Enable scroll to Top functionality. // Enable scroll to Top functionality.
scrollToTop('#headline', '#menu-scroll-to-top-div'); scrollToTop('header', '#menu-scroll-to-top-div');
}); });
</script> </script>
{% endblock %} {% endblock %}