Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix UIManager detection in touch event emitter
Summary: Certain events (practically always touch events probably?) will not be correctly emitted to JS in Fabric if there is no View underneath the touch - if there is no touch target besides the ReactRootView. We can just rely on the UIManagerType annotation on the Event, which is correct and reliable. Instead, what we do today is derive UIManagerType from ViewTag, which is correct UNLESS the viewtag is the same as the SurfaceId, in which case we may incorrectly detect that the touch is on a non-Fabric View when in fact it is on a Fabric ReactRootView. ViewTag is not a reliable way to detect Fabric vs non-Fabric /when looking at the RootView/, where ViewTag is the same as SurfaceId. Ironically, only Fabric RootViews have a SurfaceId at all. Practically, this won't change anything since events emitted to ReactRootView don't go anywhere (they don't have EventEmitters). So this is a pretty low-stakes fix, but is still technically correct. Changelog: [internal] Reviewed By: mdvacca Differential Revision: D34149878 fbshipit-source-id: f01da556865eb597a50cd49e9787316a0ed56f70
- Loading branch information