Files
react/scripts
Valentin Shergin 97ab3f5ef8 Removed optimization for events without target in ReactNativeEventEmitter (#9219)
* Removed optimization for events without target in ReactNativeEventEmitter

This PR fixes the problem originally introduced in https://github.com/facebook/react/pull/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: https://github.com/facebook/react-native/issues/12976 .

The test also illustrates this problem.

* Prettier
2017-03-20 17:07:28 -07:00
..
2016-04-07 17:30:23 -07:00
2016-09-12 21:58:00 +03:00
2017-03-20 16:15:01 +00:00
2016-12-07 16:04:47 -08:00
2017-03-10 17:06:02 -08:00
2017-03-20 16:15:01 +00:00
2013-09-09 23:42:54 -07:00