You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We (MetaMask) are using FlashList V2 to render our list of accounts. The user can open this list of accounts, tap one of them and this will change their globally selected account. However we noticed in testing that sometimes touch events are not being registered at all. This leaves the user tapping frantically with no feedback. This could be that the touch events are not firing, or it could be that the onPress is not registered for that cell. Either way the issue is weird and causing a UX regression in our app. The other curious aspect of this bug is that the issue does not occur every time you open the list but instead seems to happen randomly if the user touches the list quickly enough. This issue seems to only be effecting Android. If the user scrolls on the list, all cells become touchable and the list works as expected. Something about the initial load/lack of scrolling is causing this weird behaviour.
When the user touches the account cell, it should update the state to show that this is the new current selected account and close the list.
Reproduction
Our code is open source and can be viewed/run here.
Once you have setup the codebase, you can run the app locally via
yarn setup
yarn start:android
Once the app builds, disable dev mode via developer settings (shake device, open dev options and toggle off dev mode)
If this is too challenging I can try and find an easier way to share the code.3. create or import a wallet via the onboarding flow
once onboarding is complete, you should be taken to the main home page
click on the little drop down menu shown in the top left corner (for a new account it should say "Account 1")
the list should open in a bottom sheet
without scrolling on the list, quickly tab another account.
See that the touch event is not triggering the on press handler for that cell
Reproducing this issue is challenging since it does not occur every time. The user must quickly tap on the cell in the accounts list for this error to occur.
Once the user scrolls on the screen, all cells become touchable. Therefore you must tap the screen before you do any scrolling in the list.
I was not able to reproduce this issue in dev mode so you need to turn that of (via developer menu)
This issue only seems to occur on Android phones. We tested with the latest pixel 8 so the performance of the phone is likely not the issue.
Updating to v 2.1.0 did not fix the issue (our current version is 2.0.3
I did some research that led me to believe this issue is a result of having the FlashList rendered inside a BottomSheet component using the GestureHandler (described in GestureHandler issue).
Description
We (MetaMask) are using FlashList V2 to render our list of accounts. The user can open this list of accounts, tap one of them and this will change their globally selected account. However we noticed in testing that sometimes touch events are not being registered at all. This leaves the user tapping frantically with no feedback. This could be that the touch events are not firing, or it could be that the onPress is not registered for that cell. Either way the issue is weird and causing a UX regression in our app. The other curious aspect of this bug is that the issue does not occur every time you open the list but instead seems to happen randomly if the user touches the list quickly enough. This issue seems to only be effecting Android. If the user scrolls on the list, all cells become touchable and the list works as expected. Something about the initial load/lack of scrolling is causing this weird behaviour.
related issue: MetaMask/metamask-mobile#20735
Current behavior
497099324-3811dbe8-83c7-4e7c-91fe-3f563bcaf62a.1.mp4
Expected behavior
Reproduction
Platform
Environment
React Native info output:
FlashList version: 2.0.3
Additional context
What we have tried to fix the issue?
GestureHandler(described in GestureHandler issue).renderScrollComponent={ScrollView as React.ComponentType<ScrollViewProps>}but this did not solve the issue.Key Files
Checklist