NEW 290146
View Transitions Don't Pick up view-transition-name if CSS is loaded at the same time
https://bugs.webkit.org/show_bug.cgi?id=290146
Summary View Transitions Don't Pick up view-transition-name if CSS is loaded at the s...
Sebastian Markbåge
Reported 2025-03-20 18:08:27 PDT
https://repro-view-transition-reflow-bug.vercel.app When a new link tag is inserted with a previously uncached CSS, this prevents the `view-transition-name` from getting picked up until there's some other layout event. If it's done at the same time as `startViewTransition` is called, then there hasn't been a layout calculation yet when the "old" snapshot is computed. This leads the "old" name not to get picked up. The second time you load the repro the CSS might be cached and it works again. Therefore it's easiest to repro with caching turned off. If you add something that forces layout like `clientWidth` then it works correctly. Even if the CSS isn't cached. It seems like `startViewTransition` should itself force layout calculation before it takes the snapshot. Reproduces on STP Release 215 (Safari 18.4, WebKit 20622.1.6.111.4) and iOS 18.4 Beta 4.
Attachments
Karl Dubost
Comment 1 2025-03-20 18:56:41 PDT
Thanks Sebastian for the report. Safari Technology Preview 125/18.4 20622.1.6 Firefox Nightly 138.0a1 13825.3.11 Google Chrome Canary 136.0.7080.0 7080.0 Safari: indeed with cache disabled, doesn't pick up the smooth transition. It goes directly from Old to New Chrome: Cache disabled too. Show the smooth transition Firefox: Doesn't have it, stays on old.
Radar WebKit Bug Importer
Comment 2 2025-03-27 18:09:14 PDT
Note You need to log in before you can comment on or make changes to this bug.