Comments (5)
@danjac Turbo has data-turbo-permanent
https://turbo.hotwire.dev/handbook/building#persisting-elements-across-page-loads
from turbo.
One thing I've noticed with data-turbo-permanent vs data-turbolinks-permanent: while the HTML itself is preserved, there appears to be an issue with elements inside the data-turbo-permanent element (at least in Chromium browsers). Page transitions seem to cause a reset, reloading the element, so if for example the audio is playing it will restart. This was not an issue in Turbolinks 5.
from turbo.
Re audio: this appears to be similar to older Turbolinks issue here. Looks like workaround is to create the Audio element in Javascript rather than in the HTML (i.e. const audio = new Audio(...)) inside e.g. your Stimulus controller:
from turbo.
data-turbo-permanent
has not been removed, it just doesn't (currently) work for frame or stream renders.
from turbo.
Is there an open issue for this?
from turbo.
Related Issues (20)
- How execute js code in rails 7 'create.turbo_stream.erb' file HOT 3
- Blurred input refocusing when turbo replaces blurred input HOT 4
- Script tags are reexecuted when navigating back from a page with an error status code using browser's back button HOT 1
- Eager-loaded frame fetches but does not render its src HOT 1
- Server-side redirect from turbo stream to file download fails in Turbo 8
- Firefox issue with `scroll-behavior: smooth` and Turbo enabled (v8.0.4) HOT 3
- The documentation does not mention that Stream Action tags can be rendered inside any HTML HOT 5
- using data-turbo-action "replace" or "advance" cause turbo:before-cache event to be called on live page HOT 2
- Occasional disconnect, no documented way to monitor or reconnect HOT 5
- Incorrect page content when a Turbo "replace" stream action is followed by a refresh
- turbo-confirm doesn't work on links without a turbo-method HOT 1
- Window.fetch has been overwritten by Stimulus HOT 5
- Adding stimulus breaks a test...why?
- Indefinite Progress Bar on Turbo.visit with turbo-stream content HOT 5
- Preserve scroll position when morphing turbo frames
- turbo:morph-element fires twice
- Form not displaying errors on page HOT 2
- Morph with infinite scroll
- turbo-frame with text only not rendering on restoration visits
- How to prevent element from being removed during morph? HOT 3
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.