-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed optimization for events without target in ReactNativeEventEmi…
…tter (#9219) * Removed optimization for events without target in ReactNativeEventEmitter This PR fixes the problem originally introduced in #6590 The problem is that `ResponderEventPlugin` (and `ResponderTouchHistoryStore`) relies on that fact that touch events are balanced. So if one `startish` event happened, should be coming `endish` event. Otherwise there is no way to maintain internal `trackedTouchCount` counter. So, if we drop some events, we break this logic. Moreover, that optimization clearly contradict with this statement from `ResponderEventPlugin`: ``` We must be resilient to `targetInst` being `null` on `touchMove` or `touchEnd`. On certain platforms, this means that a native scroll has assumed control and the original touch targets are destroyed. ``` This issue causes several major problems in React Native, and one of them (finally!) is easy to reproduce: facebook/react-native#12976 . The test also illustrates this problem. * Prettier
- Loading branch information
1 parent
7f665da
commit 97ab3f5
Showing
3 changed files
with
95 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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