- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Description
The app uses GestureDetector to handle a tap on the send button. GestureDetector works properly when the user opens a chat screen. However, if the user opens nested chats (threads), returns to the 1st one, and taps on the send button, GestureDetector does not react to this action. The expected behavior is to have the button responsive.
Note: the bug is replicated for a case when there are 2 nested screens e.g. Main chat -> Subchat -> Subchat.
There is an issue with the Expensify app - Expensify/App#41528.
Video
Bug6469224_1714674407897.RPReplay_Final1714674254.mp4
Looks like at some moment GestureDetector loses a "connection" for the initial screen send button.
I've tried to do a force update for GestureDetector via setting and updating a key
when the screen is focused, and it helps. So it requires a rerender of GestureDetector to refresh the "connection" and handle tap events.
Steps to reproduce
- Launch the "New Expensify" app on IOS.
- Click on "+".
- Start a chat with someone.
- Open the chat.
- Click on "+" on the left of the input.
- Click "Submit expense".
- Submit this expense.
- Submit one more expense.
- Click on the newly created expense preview in the chat.
- Click on any expense preview.
- Go back to the main chat.
- Enter any message.
- Click on the send button on the right of the input.
- Current behavior: the send button is not responsive. Expected behavior: the message is sent.
Snack or a link to a repository
https://github.com/Expensify/App
Gesture Handler version
2.14.1
React Native version
0.73.4
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
iPhone 15 Pro Max (IOS 17.5)
Acknowledgements
Yes
Activity
github-actions commentedon May 20, 2024
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
rezkiy37 commentedon May 20, 2024
I've attached the link - https://github.com/Expensify/App.
j-piasecki commentedon May 22, 2024
I spent some time looking into this and I managed to track it down to be caused by
react-freeze
(so essentially bySuspense
).This is enough to reproduce the issue:
It's only reproducible on iOS, because Android keeps hidden views mounted (at the moment of writing): https://github.com/facebook/react-native/blob/9dfcb9ec3ae6987a3231e4d6dd2bf8fb557440c8/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp#L217-L223
I will come back to it next week, after App.js conf.
Fix GestureDetector not working correctly with suspense and recycling (…
rezkiy37 commentedon May 28, 2024
Thank you guys! I am going to test it as well 🙂
rezkiy37 commentedon May 28, 2024
Btw, when can we expect the next release?
j-piasecki commentedon May 29, 2024
Next week at the earliest.