Comments (1)
What happens is that Turbo expects the src of a Turbo Frame to be used only the first time, or otherwise changed via JavaScript. When Turbo makes the request associated with a Turbo Frame, it will only replace that Turbo Frame with the content of the other Turbo Frame that comes in the response. It will not touch anything in the turbo-frame element itself, Except for the src attribute, which is set to the page on which the visit ended from which the new Turbo Frame content was obtained, and other things such as the complete attribute. So when you return to the main page, the original src of the Turbo Frame is never set (/metrics/energy/day). Instead, the src will be the page URL that the Turbo Frame was directed to, which would be the main page in this case (/day/energy). When you browse Turbo Frames, you should only expect what is inside them to change, but not the element itself. I hope I have explained well. I think this is the intended behavior anyway.
from turbo.
Related Issues (20)
- Support `data-turbo-frame="_parent"` in nested frames
- Morphing is updates an `a` tag, but not it's content, but only on the client who initiated the action HOT 10
- Navigating to page with non-successful response seems to reload javascript HOT 10
- Turbo doesn't send Turbo-Frame header when frame's src is updated HOT 13
- Morphing: impossible to "clear" a form due to ignoreActiveValue: true HOT 9
- Morphing overwrites the user's input on active element HOT 4
- Turbo 8 link advance with frame and temporary not render
- Progress bar does not disappear after fast network response HOT 2
- Turbo 8 data-turbo-action=advance and turbo stream replaces head section HOT 2
- InstaClick does not work when use frame to same page
- Turbo stream refresh takes precedence over user interaction HOT 3
- Turbo morph not preserving stimulus values HOT 1
- Turbo morph displays progress bar HOT 2
- [QUESTION] Plans for turbo handle routes? HOT 1
- Using data-turbo-action="advance" to update URL breaks morphing
- Refresh events for individual frames HOT 6
- turbo_frame_tag src: format: turbo_stream call back refresh morph.
- `turbo:before-fetch-response` not always fired on link HOT 1
- Make turbo progress bar optional HOT 1
- Redirect after form success HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbo.