Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-view-transitions-1] Skip ViewTransitions in detached iframes #10264

Open
khushalsagar opened this issue Apr 29, 2024 · 5 comments
Open

[css-view-transitions-1] Skip ViewTransitions in detached iframes #10264

khushalsagar opened this issue Apr 29, 2024 · 5 comments
Labels
css-view-transitions-1 View Transitions; Bugs only Needs Edits

Comments

@khushalsagar
Copy link
Member

If startViewTransition is called on an iframe which is detached from the tree, or the iframe becomes detached during the transition, should we skip the transition? It seems similar to how we handle document visibility here.

@nt1m @noamr

@khushalsagar khushalsagar added the css-view-transitions-1 View Transitions; Bugs only label Apr 29, 2024
@nt1m
Copy link
Member

nt1m commented Apr 29, 2024

Is there a tangible benefit into doing so?

@khushalsagar
Copy link
Member Author

If the iframe is detached we'll never render any frames for it and will be stuck at the step here, waiting for the next frame to capture the old state. Seems better to skip and invoke the update callback to show the new DOM directly. Same reasoning as the visibility case IMO.

@nt1m
Copy link
Member

nt1m commented Apr 29, 2024

Ah right, I don't see a reason not to then.

@noamr
Copy link
Collaborator

noamr commented Apr 29, 2024

A detached iframe is always hidden, and becomes hidden when it is detached from the tree, so this should already be the case.

@khushalsagar
Copy link
Member Author

^ cool. Leaving this open to drop a note in the spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-view-transitions-1 View Transitions; Bugs only Needs Edits
Projects
None yet
Development

No branches or pull requests

3 participants