Shopify / Shopify/flash-list

Touch events not working in FlashList v2

Open
#1,939 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug P1
Dominant language
TypeScript
Stars
7.2k
Forks
393
Avg merge
1d 3h
Merged PRs (30d)
1

Description

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: https://github.com/MetaMask/metamask-mobile/issues/20735

Current behavior

  1. User opens account list
  2. User quickly taps an account to change their selected account preference
  3. Tap event does not register and leaves the list open with no action/feedback.

https://github.com/user-attachments/assets/1226b1f9-bef6-4cd7-b732-e08eec71a5d5

Expected behavior

  • 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

  1. Our code is open source and can be viewed/run here.
  2. Once you have setup the codebase, you can run the app locally via
    1. yarn setup
    2. yarn start:android
    3. Once the app builds, disable dev mode via developer settings (shake device, open dev options and toggle off dev mode)
    4. 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
  3. once onboarding is complete, you should be taken to the main home page
  4. click on the little drop down menu shown in the top left corner (for a new account it should say "Account 1")
  5. the list should open in a bottom sheet
  6. without scrolling on the list, quickly tab another account.
  7. 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.

Platform

  • iOS
  • Android
  • Web (if applicable)

Environment

React Native info output:
System:
  OS: macOS 26.0.1
  CPU: (14) arm64 Apple M4 Pro
  Memory: 1.86 GB / 48.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.18.0
    path: ~/.nvm/versions/node/v20.18.0/bin/node
  Yarn:
    version: 3.8.7
    path: ~/.nvm/versions/node/v20.18.0/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v20.18.0/bin/npm
  Watchman:
    version: 2025.07.21.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/owencraston/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.0
      - iOS 26.0
      - macOS 26.0
      - tvOS 26.0
      - visionOS 26.0
      - watchOS 26.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.25659.59.2432.13423653
  Xcode:
    version: 26.0.1/17A400
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 3.1.6
    path: /Users/owencraston/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.9
    wanted: 0.76.9
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

FlashList version: 2.0.3

Additional context

What we have tried to fix the issue?

Key Files

Checklist

  • I've searched existing issues and couldn't find a duplicate
  • I've provided a minimal reproduction (Expo Snack preferred)
  • I'm using the latest version of @shopify/flash-list
  • I've included all required information above

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android behavior using the listed MetaMask setup, then inspect MultichainAccountSelectorList.tsx, AccountSelector.tsx, and BottomSheet.tsx. Test the initial bottom-sheet state by tapping quickly before scrolling, and compare it with behavior after scrolling. Done means account-cell taps reliably trigger the handler and update the selected account on Android.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.