-
Notifications
You must be signed in to change notification settings - Fork 439
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
Head merge issue with turbo frame navigation promoted to a page visit #1237
Comments
I have to just run into the exact same issue. I noticed because when navigating within the frame the browser tab title was being changed to the URL and I realised it was because the Initially I thought it was because we were using |
I have found the problem in my application. I'm working on an old codebase that had been upgraded to use Turbo. In debugging this error I created a minimal reproduction using
In reverse, if I remove From reading the reference on attributes I'm not really sure why this should be the case, so I think this is probably a bug. |
I've now discovered that it isn't specific to the stylesheet, this behaviour happens with you have 0 occurrences of
The importmap tag appears to include |
Adding the |
I also see this same problem occur when using a I can confirm that
I wonder, is it expected to allow navigation to frame-only pages for performance reasons, and the head comparison should be skipped if there is none? Maybe someone from the core team can comment on this before we try to provide a pull request. |
@oliverguenther I think you've uncovered the same broken control flow I documented here: hotwired/turbo-rails#580 |
When using the
data-turbo-action="advance"
attribute the document's head is merged. (Handbook)During that process meta-tags are removed from the head if the response's head doesn't include them. That includes meta-tags that may be required such as
csrf-token
orvapid-public-key
.I ran into this issue when using the custom layout provided by turbo-rails.
Thank you
Gems:
turbo-rails (2.0.5)
Packges:
@hotwired/turbo-rails@^8.0.4
@hotwired/turbo@^8.0.4
The text was updated successfully, but these errors were encountered: