react / react/react-native

FlatList children sometimes stop responding to taps when using pull-to-refresh

Offen
#48,804 7 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Component: FlatList Issue: Author Provided Repro
Vorherrschende Sprache
C++
Sterne
127k
Forks
25.3k
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
4

Beschreibung

Description

When performing a FlatList pull-to-refresh shortly after a regular scroll up, the contents of the list sometimes become completely unresponsive to taps. When that happens, a slight scroll down immediately fixes the issue,

Steps to reproduce
  1. Scroll to the top of the list
  2. Scroll down slightly so there's room for the next maneuver
  3. Do a gentle scroll up, and while the scroll still has momentum and you are near the top of the list, do another scroll up to engage the pull-to-refresh (you don't need to actually trigger a refresh but the bug remains even if you do)
  4. After you release the gesture, the buttons in the list are unresponsive to taps until you perform a scroll down again
React Native Version

0.76.6

Affected Platforms

Runtime - Android

Output of npx react-native info
System:
  OS: Windows 11 10.0.22631
  CPU: "(12) x64 AMD Ryzen 5 5600H with Radeon Graphics         "
  Memory: 2.94 GB / 13.86 GB
Binaries:
  Node:
    version: 22.12.0
    path: C:\nvm4w\nodejs\node.EXE
  Yarn:
    version: 1.22.22
    path: C:\nvm4w\nodejs\yarn.CMD
  npm:
    version: 10.9.0
    path: C:\nvm4w\nodejs\npm.CMD
  Watchman:
    version: 20241222.093427.0
    path: C:\ProgramData\chocolatey\bin\watchman.EXE
SDKs:
  Android SDK:
    API Levels:
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.3
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-34 | Google Play Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK:
    AllowDevelopmentWithoutDevLicense: Enabled
    AllowAllTrustedApps: Disabled
    Versions:
      - 10.0.19041.0
      - 10.0.22000.0
      - 10.0.22621.0
IDEs:
  Android Studio: AI-242.23726.103.2422.12816248
  Visual Studio:
    - 17.12.35527.113 (Visual Studio Community 2022)
Languages:
  Java:
    version: 17.0.13
    path: C:\Program Files\Microsoft\jdk-17.0.13.11-hotspot\bin\javac.EXE
  Ruby:
    version: 3.2.1
    path: C:\Ruby32-x64\bin\ruby.EXE
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: ^15.1.3
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.6
    wanted: ^0.76.6
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
Stacktrace or Logs
N/A
Reproducer

https://snack.expo.dev/@the_cetus/thankful-orange-kiwi

Screenshots and Videos

https://github.com/user-attachments/assets/5ccada90-67ef-42a3-90d3-7be33df7db47

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Führe zunächst den verlinkten Snack-Reproducer auf Android aus und befolge die aufgeführte Pull-to-Refresh-Gestenfolge rund um FlatList. Bestätige, dass Taps auf untergeordnete Elemente bis zu einem leichten Scrollen nach unten nicht mehr reagieren, und verwende dieses Verhalten anschließend als Abschlusskriterium für den Fix.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, javascript, react-native
Bereich
mobile
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.