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

Hash in URL - frame that promotes navigations to Visits action advance #1360

Open
mira-kovar opened this issue Jan 13, 2025 · 1 comment
Open

Comments

@mira-kovar
Copy link

Frame that promotes navigations to Visits

<turbo-frame id="messages" data-turbo-action="advance">
    <a href="/messages?page=2#somehash">Advance history to next page</a>
</turbo-frame>

When you click window.location is without #somehash.
I expect hastag apears in Browser URL, because of atribute data-turbo-action="advance", same as navigation outside of frame.

@mira-kovar
Copy link
Author

I thing problem will be somewhere

class FrameController {

async loadResponse(fetchResponse) {
    if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {
      this.sourceURL = fetchResponse.response.url;
    }

property this.sourceURL is filled with url of response which cannot contain #hash because is server response. With combination of action advance property this.sourceURL it has to be filled difrent way.

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