Swipe / scroll actions on Flatlist gets registered as click event
Nessuno ha ancora preso questa issue.
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.3k
- Merge medio
- 1g 23h
- PR unite (30g)
- 4
Descrizione
Description
I have a my page like this :
{children}Sometimes while user scrolls /swipes to. go back. the click event gets triggered( navigating to a screen)
I read few issues , the only solution i got so far is to track the scroll with handlePressIn & handlePressOut , then calculate the pageX,pageY difference do decide whether its a drag or click action.
Adding this affects my scroll performance , (large list of products).
Any solution to this, without compromising the app performance?
Steps to reproduce
n/a
React Native Version
0.75.4
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 15.0.1
CPU: (8) arm64 Apple M3
Memory: 107.28 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.2
path: ~/.nvm/versions/node/v18.20.2/bin/node
Yarn:
version: 3.6.4
path: ~/.nvm/versions/node/v18.20.2/bin/yarn
npm:
version: 10.5.0
path: ~/.nvm/versions/node/v18.20.2/bin/npm
Watchman:
version: 2024.05.06.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.0
- iOS 18.0
- macOS 15.0
- tvOS 18.0
- visionOS 2.0
- watchOS 11.0
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.15989.150.2411.11948838
Xcode:
version: 16.0/16A242d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.75.4
wanted: 0.75.4
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
N/A
Reproducer
snack.expo.dev/@srimarajexpo/delicious-violet-ramen
Screenshots and Videos
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Esegui il reproducer Snack collegato su iOS con React Native 0.75.4 e analizza l’interazione descritta tra FlatList e Pressable. Conferma se uno swipe attiva la navigazione, quindi riducilo a un problema riproducibile del framework con un comportamento atteso chiaro; nel report non sono identificati file del repository né test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- react-native
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 28/100