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

Ensure that the turbo-frame header is not sent when the turbo-frame has a target of _top #1138

Merged
merged 2 commits into from
Jan 24, 2024

Commits on Jan 23, 2024

  1. Ensure that the turbo-frame header is not sent when the turbo-frame h…

    …as a target of _top
    
    Given an HTML structure like this:
    
    ```html
    <turbo-frame id="frame" target="_top">
      <a href="/src/tests/fixtures/prefetched.html">Hover to prefetch me</a>
    </turbo-frame>
    ```
    
    When the user hovers over the link, the turbo-frame header should not be sent
    in a prefetch request because the wrapping turbo-frame has a target of `_top`.
    
    If we don't respect this turbo-rails sees the turbo-frame header and renders
    a turbo-frame response with a minimal layout that doesn't include any assets
    in the head. When turbo processes the response it may find a missmatch in
    tracked assets and cause a reload.
    afcapel committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    759b421 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. Configuration menu
    Copy the full SHA
    894027d View commit details
    Browse the repository at this point in the history