withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
43.84k stars 2.28k forks source link

transition:persist doesnt work for iframes. #11311

Closed laurencefass closed 1 week ago

laurencefass commented 1 week ago

Astro Info

Astro                    v4.11.0
Node                     v18.17.0
System                   Linux (x64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/solid-js
                         @qwikdev/astro
                         @astrojs/react

If this issue only occurs in one browser, which browser is a problem?

chrome

Describe the Bug

Im working through docs for ViewTransitions. transitions dont appear to work for iframes (at least not with videos in them!)

Ive supplied a github link to this demo URL which renders html video element, a react counter, and a youtube iframe. The html video element and the react counter for the most part persist across transitions (not in all cases but Ill investigate separately) Howeve a youtube embed iframe reloads with every page nagvigation. Ive tried wrapping the iframe in a div but it too also reloads the iframe with each navigation.

Im wondering how can I play a youtube video or add embedded content and make good use of transition:persist?

Is this beyond design scope? Is it not working intentionally? Or is this a bug?

layout

What's the expected result?

dont know what the expected result is for iframes (bug or intentional?) but I would like to play a youtube video across page navigations.

Link to Minimal Reproducible Example

https://github.com/laurencefass/syntapse-astro/blob/main/src/layouts/Layout.astro

Participation

laurencefass commented 1 week ago

aha ive just seen this:

image

though i wont close just yet in case there's some news on this being fixed in the future (if ever?)

ematipico commented 1 week ago

though i wont close just yet in case there's some news on this being fixed in the future (if ever?)

We keep issues for bugs only. If you want, you can use the withastro/roadmap repository to propose enhancement for the current features or new features.

I am going to close it.