-
Notifications
You must be signed in to change notification settings - Fork 429
Keeping old page in the DOM until new page is loaded #516
Comments
I'm not sure what you mean. We only unload the current page after we've received the new page, by replacing the If you mean loading the scripts &co of the new page before replacing it, that's not possible because we'd have to load the new body in a different context (iframe) than the current DOM (of which there is only one), which would break all kinds of things. Which events are you binding to for your transition? |
Hi @Thibaut, thanks for trying to help! Sorry if i was unclear earlier. Currently i'm using: $(document).on 'page:fetch', ->
//transitions for page out
$(document).on 'page:load', ->
//transitions for page in But the animations are chained, meaning that they occur one after another. What i'm looking for is to animate the pages simultaneously. Here's a good example of a transition i'm trying to achieve: I think this would be possible if there was a way to insert a different Do you think this would be possible to achieve or I'm rambling nonsense? ;) |
Hi @Stafie I don't think it's possible to achieve such a transition with the current Turbolinks. You might get a slightly better transition by hooking into To make this work we would need a callback that lets you override the default I like the second idea (Turbolinks container), less so the first one (overriding replacement). I'll give this more thought in the coming weeks and see if we can make it work. I agree it'd be nice for Turbolinks to support page transitions like that. |
Great, thanks again for taking the time to explain this to me and even considering it as a new feature! |
Been playing with page transitions here and i was wondering if it would be possible to keep the current page in the DOM until we have the new page fully loaded.
This would allow me to keep the transitionOut tied to the transitionIn animation and will make the experience smoother. Let me know if this is possible and i'm missing something. Thanks!
The text was updated successfully, but these errors were encountered: