I've integrated Gridsome into my portfolio website. However, I've encountered an issue where on mobile or tablet devices with longer pages, Firefox fails to scroll back to the top when navigating. Interestingly, this problem doesn't occur in Google Chrome.
To address this, I've implemented the following code snippet to ensure the page scrolls to the top:
window.onbeforeunload = function () {
window.scrollTo(0, 0);
}
Despite experimenting with different solutions, none have proven effective so far. I'm determined to find a resolution without relying on jQuery for this specific issue.