Skip to content

fix(iOS): remove FormSheet scroll view KVO observer synchronously on invalidate#4091

Open
phewphewb wants to merge 4 commits into
software-mansion:mainfrom
phewphewb:fix-form-sheet-scroll-view-clipped
Open

fix(iOS): remove FormSheet scroll view KVO observer synchronously on invalidate#4091
phewphewb wants to merge 4 commits into
software-mansion:mainfrom
phewphewb:fix-form-sheet-scroll-view-clipped

Conversation

@phewphewb
Copy link
Copy Markdown

Description

Fixes #4090

After dismissing FormSheet, pushed screen ScrollView is clipped to sheet height.
FormSheet KVO observer not removed before scroll view is reused by the next screen.

Changes

  • Remove the FormSheet scroll view KVO observer synchronously at the start of -invalidateImpl, instead of inside the dispatch_async block introduced in feat(iOS, Stack v4): Use new invalidation callback on Fabric #3728
  • Keep deferring _controller - nil to the async block (unchanged)
  • Add Test4090 as a minimal repro for dismissing a form sheet and immediately pushing a screen with a full-height ScrollView

Before & after - visual documentation

Before

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-22.at.22.59.32.2.mov

After

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-24.at.18.38.05.mov

Test plan

Checklist

  • Included code example that can be used to test this change.
  • For visual changes, included screenshots / GIFs / recordings documenting the change.
  • For API changes, updated relevant public types.
  • Ensured that CI passes

@phewphewb
Copy link
Copy Markdown
Author

@kkafar @t0maboro @kligarski

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.

After dismissing FormSheet, pushed screen ScrollView is clipped to sheet height

2 participants