Skip to content

[pull] main from withastro:main#423

Merged
pull[bot] merged 2 commits intocode:mainfrom
withastro:main
Mar 5, 2026
Merged

[pull] main from withastro:main#423
pull[bot] merged 2 commits intocode:mainfrom
withastro:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 5, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

rururux and others added 2 commits March 5, 2026 06:53
… Safari swap (#15728)

* fix(transitions): prevent WebGL context loss on persist canvas during body swap

`swapBodyElement()` previously called `replaceWith()` which detached the
old body from the DOM before moving persist elements to the new body.
Safari loses WebGL2 context when canvas elements are briefly detached
from the DOM tree.

The fix lifts persist elements with matching targets to `<html>` before
the body swap, so they remain in the DOM throughout the transition.
Uses `moveBefore()` where available (Chrome 133+) for zero-detachment
atomic moves. Elements without a matching `transition:persist` target
in the new page are correctly dropped (not re-inserted).

Includes e2e tests for canvas state preservation and orphan cleanup.

* addressing the users, avoiding implementation details.

---------

Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
@pull pull bot locked and limited conversation to collaborators Mar 5, 2026
@pull pull bot added the ⤵️ pull label Mar 5, 2026
@pull pull bot merged commit 12ca621 into code:main Mar 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants