[deprecated in favor of https://microsoft.github.io/react-native-windows/] React Native for macOS is an experimental fork for writing desktop apps using Cocoa
MIT License
11.24k
stars
429
forks
source link
Clear touch handler states when gesture recognizer ended. #128
In RCTTouchHandler, touch states are removed in -[RCTTouchHandler _recordRemovedTouches:], which is called in -[RCTTouchHandler mouseUp:]. The problem is -[RCTTouchHandler mouseUp:] is not guaranteed to be called, and when it's not, the touch states would be wrong.
So, correct me if I was wrong, I think touch states need to be cleared some where, and I think -[NSGestureRecognizer reset] might be the right place.
In RCTTouchHandler, touch states are removed in
-[RCTTouchHandler _recordRemovedTouches:]
, which is called in-[RCTTouchHandler mouseUp:]
. The problem is-[RCTTouchHandler mouseUp:]
is not guaranteed to be called, and when it's not, the touch states would be wrong.So, correct me if I was wrong, I think touch states need to be cleared some where, and I think
-[NSGestureRecognizer reset]
might be the right place.