mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix isRootVisible not working with non-Venice
Summary: ## Context ```isRootViewVisible``` doesn't work as expected for non-Venice: when enter Marketplace tab, ```isRootViewVisible``` should returns true with Marketplace tab's rootViewTag, but it returns false. ## Root cause ```rootViewTag``` is added to "mVisibleRootTags" in "FbReactRootVisibilityTracker" when ```BaseFbReactFragment.onViewDidAppear()``` gets called, but ```BaseFbReactFragment.onViewDidAppear()``` is called earlier than when the ```rootViewTag``` is set. ## Fix Move setRootViewTag to earlier when RootView is created instead of in startSurface or mounting. Changelog: [Android][Changed] - Move setRootViewTag to earlier when RootView is created Reviewed By: RSNara Differential Revision: D38586584 fbshipit-source-id: aec3ed37eb62289a19794e68b1a6b5ca213cb14a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8c882b4f3d
commit
4d642a2250
@@ -1260,7 +1260,6 @@ public class ReactInstanceManager {
|
||||
: Arguments.fromBundle(initialProperties),
|
||||
reactRoot.getWidthMeasureSpec(),
|
||||
reactRoot.getHeightMeasureSpec());
|
||||
reactRoot.setRootViewTag(rootTag);
|
||||
reactRoot.setShouldLogContentAppeared(true);
|
||||
} else {
|
||||
rootTag =
|
||||
|
||||
Reference in New Issue
Block a user