Head merge issue with turbo frame navigation promoted to a page visit
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 491
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 4
Description
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 or vapid-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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the Frames handbook section on promoting a frame navigation to a page visit, then reproduce the behavior with the turbo-rails custom layout at app/views/layouts/turbo_rails/frame.html.erb and data-turbo-action="advance". Trace the head merge behavior and verify that required meta-tags such as csrf-token and vapid-public-key are retained when absent from the response head.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100