react / react/react-native

React Native Android: An absolute positioned element outside of the bounds of its parent not responding to Drag Gestures (i.ex FlatList)

Open
#34,542 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: FlatList Needs: Triage :mag: Never gets stale Platform: Android
Dominant language
C++
Stars
127k
Forks
25.3k
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Description

It's really similar to this issue: #27232.
The Tap gestures were fixed in React Native 0.66, however, the same problem persists with all the other types of gestures, especially dragging/scrolling, which is quite annoying because the flat list cannot be scrolled at all.

This happens only on Android.
Works perfectly fine on IOS and Web.
Expo SDK 46

Version

0.69.5

Output of npx react-native info

System:
OS: macOS 12.0.1
CPU: (8) arm64 Apple M1 Pro
Memory: 739.58 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.14.0 - ~/.asdf/installs/nodejs/16.14.0/bin/node
Yarn: 1.22.18 - ~/.asdf/shims/yarn
npm: 8.3.1 - ~/.asdf/plugins/nodejs/shims/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7935034
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 17.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce
  1. Create an absolute positioned component outside the bounds of its parent
  2. Add FlatList inside this component
  3. Run on an Android emulator/device, you won't be able to scroll the flat list.
Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/@jmysliv/bug-reproduction

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 with the linked Snack reproduction and the Android behavior described around an absolutely positioned component containing a FlatList. Reproduce the failed drag or scroll gesture on Android, compare it with iOS and Web, and trace the relevant React Native gesture and view handling. Done means the FlatList responds to dragging when positioned outside its parent bounds.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.