mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-06 18:00:40 +08:00
Make sure shadow node that we set JSResponder to mounts to a View
Summary: When setJSResponder() is called on a shadow node that doesn't mount to a View, React runtime will crash in NativeViewHierarchyManager because it will fail to find a corresponding View. To fix the issue, make sure we forceMountToView() before we call enqueueSetJSResponder(). Reviewed By: ahmedre Differential Revision: D2779523
This commit is contained in:
committed by
Ahmed El-Helw
parent
12023b7953
commit
f6b4dc68de
@@ -52,6 +52,10 @@ import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
mOperationsQueue = operationsQueue;
|
||||
}
|
||||
|
||||
/* package */ FlatUIViewOperationQueue getOperationsQueue() {
|
||||
return mOperationsQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a root of the laid-out shadow node hierarchy, walks the tree and generates an array of
|
||||
* DrawCommands that will then mount in UI thread to a root FlatViewGroup so that it can draw.
|
||||
|
||||
Reference in New Issue
Block a user