react / react/react-native

ScrollView starts scrolled to bottom inside Modal if Pressable inside

オープン
#43,187 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Component: Modal Component: ScrollView Issue: Author Provided Repro
主要言語
C++
スター
127k
フォーク
25.3k
平均マージ
1日 23時間
マージ済み PR(30日)
4

説明

Description

If I use a ScrollView with an Pressable at the end of content container inside a Modal, the scroll position is initially at the bottom.
Here is a minimal example: https://snack.expo.dev/ZmDt9FQIQjzw0x8SM6-XD

Steps to reproduce
  1. Create a Modal
  2. Inside create a Scrollview and fill content
  3. Add Pressable at bottom
  4. Open Modal with ScrollView
React Native Version

0.73.4

Affected Platforms

Runtime - Web

Output of npx react-native info
System:
  OS: Windows 11 10.0.22621
  CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics
  Memory: 3.74 GB / 15.37 GB
Binaries:
  Node:
    version: 20.9.0
    path: C:\Program Files\nodejs\node.EXE
  Yarn: Not Found
  npm:
    version: 9.3.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-223.8836.35.2231.11090377
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.10
    path: C:\Program Files\Eclipse Foundation\jdk-17.0.10\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.4
    wanted: 0.73.4
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found
Stacktrace or Logs
-
Reproducer

https://snack.expo.dev/ZmDt9FQIQjzw0x8SM6-XD

Screenshots and Videos

No response

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、手順で説明されている Modal、ScrollView、下部の Pressable を使用して、報告された React Native バージョンでリンクされた Snack reproducer を Web 上で実行します。ScrollView の初期位置を決定する Web の挙動を追跡します。完了条件は、Modal がコンテンツの下部までスクロールされた状態ではなく、コンテンツの先頭で開くことです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
react-native
領域
frontend, web-dev
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。