-
Notifications
You must be signed in to change notification settings - Fork 24.1k
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
[Android] Convert event to local coordinates inside the target view. #3426
Conversation
…atching touch event.
By analyzing the blame information on this pull request, we identified @mkonicek and @andreicoman11 to be potential reviewers. |
@@ -53,6 +53,18 @@ public static int findTargetTagForTouch( | |||
return targetTag; | |||
} | |||
|
|||
public static View findTargetViewForTouch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a simpler version of findTargetTagForTouch
. Could share code instead of copy&pasting.
Missing documentation.
How would you test this doesn't break any existing Android core components? Can you come up with an example use case in JS this would break? |
We'll open source all the Android integration tests so we'd see on Travis if this breaks anything. |
Can you link to the place in the docs where this is defined and the iOS implementation? |
Talked to @andreicoman11, this issue is valid, he said he'd likely look into fixing this himself. |
Alright then, I'm glad someone more familiar with the code base will have a look at this. If @andreicoman11 is working on this as well, I don't need to bother preparing an updated patch. The change shouldn't break any core components, because as of now, the only JS code using |
@mkonicek Do you have an idea when this issue will be solved? Is kind of blocking for me at the moment :) |
Until the PR facebook/react-native#3426 is merged, we need to always return "true" in the method _handleStartShouldSetPanResponder, as discussed in jeanregisser#5 (comment).
Checked with @andreicoman11, no ETA yet as there are many issues to prioritize. He has a task for it in the internal fb task tool. Closing this PR as Andrei will take care of the implementation. |
This change makes sure
nativeEvent.locationX
and.locationY
are coordinates relative to the element, as described in the documentation. And as is current behavior on iOS. Should fix #3201.