-
Notifications
You must be signed in to change notification settings - Fork 8
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
Touch not tracked correctly in screens with presentation='modal' (iOS only) #281
Comments
Hi @fbeccaceci! |
It seems to be a problem with react-native-gesture-handler, i opened this issue on their repo software-mansion/react-native-reanimated#7099 and let's see what they say I managed to reproduce the same behaviour in an empty project without react-native-sortables, https://github.com/fbeccaceci/ReanimatedMeasureExample I don't know if there is something that could be done to this library to workaround this in the mean time |
It seems to me that gesture handler may return correct values, whilst the I also encountered some other measurement problems with reanimated's I didn't have time to look into this yesterday. I will take a look today/tomorrow and come back to you once I know more about what happens in there. |
Hey @fbeccaceci! |
Looks good to me |
This picture is the example app in the SortableGrid section, page "Playground" with presentation changed to "modal" on iOS, found this problem in my app and happens in the example as well
As you can see the center of the cross is not aligned with my mouse cursor (same happens with my finger on real devices), this doesn't happen in non-modal screens (i'm using enableActiveItemSnap={true})
It may looks a minor inconvenience but there are 2 main problems:
I did a bit of investigation, this problems seems to be caused by this:
const containerMeasurements = measure(containerRef);
in DragProvider.tsx inside of handleDragStart functionfor some reasons i don't know measure() returns a slightly wrong (about 16px on average) pageY value, which causes the misalignment and the change in the hitbox due to this check a few lines below
I'm experiencing this problem both in an app of mine and the example app, tested with Fabric, i haven't tested with the old arch
The text was updated successfully, but these errors were encountered: