Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Firefox, scrolling to the anchor on a new page is not working #1329

Open
mvz opened this issue Oct 24, 2024 · 0 comments
Open

On Firefox, scrolling to the anchor on a new page is not working #1329

mvz opened this issue Oct 24, 2024 · 0 comments

Comments

@mvz
Copy link

mvz commented Oct 24, 2024

I am using Turbo with Rails using the turbo-rails gem. My application has internal links that use an anchor to scroll an important element into view. This works on Chrome and Webkit. However, on Firefox, users end up at the top of the page. When I step through the code, I can see that the correct anchor is scrolled into view, but then the onScroll handler sets the position back to the top of the page. The change to focusElement presented in #1255 (comment) also solves my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant