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)

未关闭
#34,542 5 条评论 3 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Component: FlatList Needs: Triage :mag: Never gets stale Platform: Android
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从链接的 Snack 复现以及所描述的、围绕包含 FlatList 的绝对定位组件的 Android 行为开始。在 Android 上复现失败的拖动或滚动手势,与 iOS 和 Web 进行比较,并追踪 React Native 中相关的手势和视图处理。完成标准是:当 FlatList 被定位在其父级边界之外时,它能够响应拖动。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, react-native
领域
mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。