-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash with multi RootView by multi touch #9503
Comments
For the first issue, after look into android's impl, I'm sure it's a bug. Touch event's coalesce logic is different on android and iOS, I think the easiest way to fix this is pass RCTRootView's tag as RCTTouchEvent's viewTag property, and I checked this works. If this way is ok, I will send a PR. |
For the second issue: 'Cannot find single active touch', turnning off the RCTTouchHandler for the inner view solves this warning. |
@littlesome It happened to me, too. Did you send a PR? |
This fix issue facebook#9503
I have many RCTRootView in my app, and got crash like this:
(my app based on 0.30.0 iOS, this repro below uses 0.25.1)
UIExplorer's RCTRootView example can reproduces this bug (100%), try to touch the 'Embedded React Native view' and 'React Native Button' at the same time.
I noticed that in RCTEventDispatcher.m RCTGetEventID returns same value
for RCTTouchEvent
viewTag: is always 0
coalescingKey: each RCTRootView's RCTTouchHandler has this value starting from 0
So set a viewTag (maybe just the target view's reactTag) for RCTTouchEvent solves this,
any other better solutions?
And one more thing, I got warning 'Cannot find single active touch.' on JS side, stack:
UIExplorer's RCTRootView example can reproduces this bug (not 100% easier on real device), try to hold the 'Embedded React Native view' and then tap the 'React Native Button'.
There's already an issue for this #79, reopen it?
The text was updated successfully, but these errors were encountered: