Skip to content

Bug: ViewTransition with enter/exit hard-crashes iOS Safari #35336

@gaearon

Description

@gaearon

I'm experiencing an iOS-only crash (iOS 26.1) when there's ViewTransition with enter and another with exit:

import { Suspense, use } from "react";
import { ViewTransition } from "react";
import "./App.css";

const promise = new Promise((r) => setTimeout(() => r("Done"), 3000));

function Content() {
  return <div>{use(promise)}</div>;
}

export default function App() {
  return (
    <Suspense
      fallback={
        <ViewTransition exit="vt-reveal">
          <div>Loading...</div>
        </ViewTransition>
      }
    >
      <ViewTransition enter="vt-reveal">
        <Content />
      </ViewTransition>
    </Suspense>
  );
}
::view-transition-old(.vt-reveal) {
  animation: 300ms ease-out both vt-out;
}
::view-transition-new(.vt-reveal) {
  animation: 300ms ease-out both vt-in;
}
@keyframes vt-out {
  to {
    opacity: 0;
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
  }
}

This is a hard crash, meaning the browser tab literally dies.

Sandbox: https://codesandbox.io/p/sandbox/gns365?file=%2Fsrc%2FApp.js

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions