Skip to content

Preserve hash fragment during frame navigation#1507

Open
redsun82 wants to merge 1 commit intohotwired:mainfrom
redsun82:fix/preserve-hash-in-frame-navigation
Open

Preserve hash fragment during frame navigation#1507
redsun82 wants to merge 1 commit intohotwired:mainfrom
redsun82:fix/preserve-hash-in-frame-navigation

Conversation

@redsun82
Copy link
Copy Markdown

@redsun82 redsun82 commented Feb 18, 2026

fetchResponse.response.url strips the hash fragment (browsers never send it over the wire), so when FrameController.loadResponse updated sourceURL the hash was lost from the frame's [src] and any promoted URL state.

Re-attach the original hash from sourceURL after the response is received.

Partially addresses #598

`fetchResponse.response.url` strips the hash fragment (browsers
never send it over the wire), so when `loadResponse` updated
`sourceURL` the hash was lost. This affected promoted URL state
via `data-turbo-action="advance"` and the frame's `[src]`
attribute.

Re-attach the original hash from the frame's `sourceURL` after a
non-redirect response.

Partially addresses hotwired#598
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant