Skip to content

fix(ios): reset the layer transform before setting a frame under an animation - #7

Merged
farfromrefug merged 1 commit into
mainfrom
fix/ios-frame-under-animated-transform
Oct 2, 2026
Merged

farfromrefug merged 1 commit into
mainfrom
fix/ios-frame-under-animated-transform

Conversation

@farfromrefug

Copy link
Copy Markdown

PR Checklist

  • The PR title follows our guidelines
  • There is an issue for the bug/feature this PR is for.
  • You have signed the CLA.
  • All existing tests are passing: unit tests not run; packages/core typechecks.
  • Tests for the changes are included.

What is the current behavior?

_modifyNativeViewFrame sets the layer transform to identity before setting a frame (UIKit counts a frame set under a transform against it), but decides from _isTransformed. That flag is only updated in updateNativeTransform. An Animation sets layer.transform natively first, then the view's properties, which then already match and skip updateNativeTransform, so the flag stays false.

A view re-laid out while it carries an animated translation gets that translation counted twice. Hit in alpimaps with ui-persistent-bottomsheet: the sheet content grows (523 → 561 pt) while it slides up, its resting frame shifts down by the translation (124 pt), and the sheet ends just below the window edge.

What is the new behavior?

The check reads the layer's actual transform (!CATransform3DEqualToTransform(nativeView.layer.transform, CATransform3DIdentity), as elsewhere in the file). _isTransformed had no other use and is removed.

Verified in alpimaps on Mac Catalyst (same code path as iOS): selecting a point item then a route, the sheet now stays up.

🤖 Generated with Claude Code

…nimation

_modifyNativeViewFrame resets the transform to identity before setting the
frame, since UIKit counts a frame set under a transform against it. It
decided from _isTransformed, which updateNativeTransform keeps. An
Animation sets layer.transform first and the view's properties after,
which then match and skip updateNativeTransform, so the flag still read
untransformed. A view re-laid out while animated (a bottom sheet growing
as it slides up) got its translation counted twice and landed off screen.
The check now reads the layer's actual transform; the flag had no other
use and is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@farfromrefug
farfromrefug marked this pull request as ready for review October 2, 2026 21:16
@farfromrefug
farfromrefug merged commit 7dbf4c6 into main Oct 2, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant