Scroll To Text Fragment (#:~:text) not working / inconsistent behavior | Flickering on scrolled page reload #1933
Labels
bug
Something isn't working
core
Related to the core Inertia library
help wanted
Extra attention is needed
Version:
@inertiajs/vue3
version: 1.2.0Describe the problem:
Scroll To Text Fragments, which are usually present on SERP top snippets are not working
Default behavior when those snippets are clicked is for the web page to highlight the text and scroll to the highlighted text position.
Currently Inertia.js eats up the hash navigation and the page is opened without scrolling, although that behavior is also inconsistent because in some cases it does scroll down after flickering
this.mp4
From my observations disabling swapComponent on handleInitialPageVisit call fixes this issue as well as an inconsistent scroll behavior + flickering when reloading scrolled pages (although I don't know if that will break other internal stuff)
Steps to reproduce:
This behavior occurs on one of my production projects running Inertia SSR, but here's a minimal reproduction
https://github.com/Megarsh/inertia-issue
The text was updated successfully, but these errors were encountered: