-
Notifications
You must be signed in to change notification settings - Fork 24.2k
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
[Touches] Translated components receive touches at their non-translated position #3557
Comments
Ah |
Yeah I think so. It might just be Android clowniness but perhaps RN is doing something to disable hitbox translation or can change this behavior on Android. |
Interesting, thanks for reporting it. @andreicoman11 do you think it's related to the issue where touch coordinates are absolute instead of relative on Android? |
This regression was introduced in c805157 |
@dmmiller Is now working on making the payload of touch events consistent between iOS and Android. |
@dmmiller thanks a lot! :) |
@dmmiller Sorry to ask again, but is there any ETA on this? Or any hotfix I could test? |
@PhilippKrone Currently I've reverted the commit I've linked to and building from source. I needed to use |
I've now implemented this fix but the issue is not gone yet. |
@PhilippKrone Which fix? |
I have a fix internally that I should be pushing in the next day or so. |
@dmmiller thanks for the update. Much appreciated I'm sure. |
@PhilippKrone @satya164 That fix you mentioned was not a fix for this issue. That fix fixed the values passed in the touch events to be local to the targeted view. The fix for this is currently in review and is explicitly for transformed views. |
@dmmiller Looking forward to the fix. Thanks a lot :) |
@dmmiller Anything new concerning this fix for transformed views? |
Waiting on @andreicoman11 to get back from holiday and accept it :) He should be back today so hopefully, we can get it pushed today. |
@dmmiller That would be awesome. Thank you :D |
Summary: public Our view handling for determining if a touch was in a view was not transform aware. This updates it to be transform aware (by borrowing the code from ViewGroup). Now, touches will be correctly translated to the view if the view is transformed. They will also have the correct local touch point. This fixes facebook#3557 Reviewed By: andreicoman11 Differential Revision: D2696063 fb-gh-sync-id: 291f6b9884c610c29f8f8b9992c98d59863ab481
Summary: public Our view handling for determining if a touch was in a view was not transform aware. This updates it to be transform aware (by borrowing the code from ViewGroup). Now, touches will be correctly translated to the view if the view is transformed. They will also have the correct local touch point. This fixes #3557 Reviewed By: andreicoman11 Differential Revision: D2696063 fb-gh-sync-id: 291f6b9884c610c29f8f8b9992c98d59863ab481
When translating a View on Android (0.14.0-dev), it continues to receive touches at its original position which is probably not what you want. Here's the repro with PanResponderExample in the UIExplorer (you need to touch the top-left of the scene to move the circle):
The text was updated successfully, but these errors were encountered: