Skip to content

fix: make iOS Core Animation transitions persistent for pseudo selectors#9814

Closed
MatiPl01 wants to merge 3 commits into
@wisniewskij/pseudoselectors-priority-over-rerender2from
@matipl01/persistent-pseudo-transition
Closed

fix: make iOS Core Animation transitions persistent for pseudo selectors#9814
MatiPl01 wants to merge 3 commits into
@wisniewskij/pseudoselectors-priority-over-rerender2from
@matipl01/persistent-pseudo-transition

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Stacked on #9775. Replaces #9809.

On iOS, CSS properties routed to Core Animation animate as a one-shot CABasicAnimation that self-removes on completion, after which the layer falls back to its model value — the value React keeps committing. So while :active is held past the transition duration, the rendered base value reclaims the layer and the pseudo value snaps back.

Since pseudo selectors always take priority, this makes their platform animation persistent (fillMode = kCAFillModeBoth, removedOnCompletion = NO) so it keeps its presentation over React's re-commits. Regular render-driven transitions stay non-persistent and unchanged; no C++ change; no-op on Android.

Verified on the iOS simulator: :active holds over the render loop with no flicker, and press/release animates in and eases back out instead of snapping to the settled value.

@MatiPl01 MatiPl01 self-assigned this Jul 1, 2026
@wisniewskij

Copy link
Copy Markdown
Contributor

I've incorporated this change in #9775

@wisniewskij wisniewskij closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants