Skip to content

Turbo frame history not navigating properly w/ back button after upgrading from 7 to 8 #1241

@charlesobrien

Description

@charlesobrien

Context:

Application has a simple live search via form:

  • Form uses "get" method (just showing data; no updates)
  • Form targets a "results" turbo frame
  • Form uses data-turbo-action="advance" to update URL (to support users being able to copy/paste w/ params for the search and filter)

What's happening: Live search is working fine. When the form is submitted (automatically as a user types), the turbo frame is updated with the correct results and the URL displays the correct query parameters. However, when navigating with the back button the turbo frame does not navigate backwards, it only shows the most recent set of results (despite the url and associated query params appropriately changing backwards).

What should be happening: As the user navigates backwards the URL query params should change (which is happening) and the turbo frame should reflect the history from that point in time.

When did this start happening: This happened on Turbo 8.0.4. and Turbo Rails 2. If I revert to Turbo < 8 and Turbo Rails < 2, the behavior works as expected.

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