-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
hitSlop does not work inside in stack header #1981
Comments
Yeah, I can confirm the issue, thanks for reporting |
seeing this as well on |
@thomasttvo, checkout this PR: #1995 |
## Description Since #1825 header config is no longer first child of a screen & `hitTest:withEvent:` method assumed this invariant to be true. Fixed that by using appropriate screen method instead of blind assumption. Fixes #1981 ## Changes * Fixed `hitTest:withEvent:` method by using `findHeaderConfig` `RNSScreenView`'s method * Improved `findHeaderConfig` method itself ## Test code and steps to reproduce `Test1981` ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
I have react-native-screens~3.29.0 and this issue still fired, any idea how to fix @kkafar |
…nsion#1995) ## Description Since software-mansion#1825 header config is no longer first child of a screen & `hitTest:withEvent:` method assumed this invariant to be true. Fixed that by using appropriate screen method instead of blind assumption. Fixes software-mansion#1981 ## Changes * Fixed `hitTest:withEvent:` method by using `findHeaderConfig` `RNSScreenView`'s method * Improved `findHeaderConfig` method itself ## Test code and steps to reproduce `Test1981` ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
I can confirm that hitSlop indeed doesn't work in v4.4.0 |
This works for our team on |
Pressables on Fabric were a subject of different issue. #2466 is supposed to fix that => this should longer be no problem since 4.6.0-beta.0 release (just released). Let me know in case you still encounter this issue. |
Description
hitSlop
does not work as expected in a Stack headerScreen.Recording.2023-12-02.at.08.16.39.mov
Steps to reproduce
<Pressable>
to eitherheaderLeft
orheaderRight
hitSlop
onPress
cb isn't calledSnack or a link to a repository
https://github.com/alexandernanberg/react-native-screens-repro
Screens version
3.22.1
React Native version
0.72.6
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
Expo managed workflow
Architecture
Fabric (New Architecture)
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: