Skip to content

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

@mvz

Description

@mvz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions