Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix event emits during initial rendering in Fabric (facebook#42777)
Summary: Pull Request resolved: facebook#42777 During view preallocation eventEmitter information is not being passed to the platform. This causes bugs with emision of events during initial rendering when using the new Fabric Event dispatching system. e.g. Rendering a TextInput that has 'onFocus' event and also has autoFocus enabled. The new Fabric Event dispatching system dispatch events earlier (this is expected) In this diff I'm fixing this issue by ensuring that all preallocated views have an eventEmitter (when its shadowNode has an eventEmitter) This was actually implemented in the past, but in order to optimize, we run an experiment (D29117957) and it was later deleted. (D40356386). I didn't find details of the results of the experiment. We could run another experiment to understand potential negative perf impact of this change, although I believe it's the right thing to do here. Changelog: [Android][Fixed] Fix delivery of events during initial rendering in new architecture Reviewed By: sammy-SC Differential Revision: D53108114 fbshipit-source-id: 0b56b7495db63e4a478f4b34e91f4bcbf452ef92
- Loading branch information