Prevent invalidateSafeAreaInsets get call when RNCSafeAreaProviderComponentView still in the fabric view pool#629
Merged
janicduplessis merged 3 commits intoAppAndFlow:mainfrom May 22, 2025
Conversation
…ponentView still in the fabric view pool
Contributor
Author
|
@janicduplessis Please help to review. Thanks! |
Contributor
Author
|
@jacobp100 Please help me review also |
jacobp100
reviewed
May 22, 2025
Collaborator
|
Thanks @vikage ! Can you just run the formatting script (yarn format:write) |
Contributor
Author
|
@janicduplessis The CI was passed. Please help me to merge it |
jacobp100
approved these changes
May 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…
Currently, RNCSafeAreaProviderComponentView is a fabric view. Fabric view using a reusable for views.
We already had
prepareForRecycleto clean up the state of view when it was removed from the superview.But we still have 2 things that can affect the state.
The first one is the notification center. We have not removed it. Then
invalidateSafeAreaInsetsstill get called when other places show the keyboard. It will lead to_initialInsetsSentbeing true, and our lib will not emit an event to js. (We have a return)The second, UIKit still calls
invalidateSafeAreaInsetswhen the keyboard shows. So we need a guard to prevent it affect our logic.Summary
We have a problem SafeAreaProvider empty children since
insetsis null, caused by other brownfield screen shows keyboard