react / react/react-native

`ScrollView` `contentContainerStyle`'s `flexGrow` doesn't account for `contentInsetAdjustmentBehavior` or `automaticallyAdjustKeyboardInsets`

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

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

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

説明

Description

This is a reopen of https://github.com/facebook/react-native/issues/25282 which is still reproducible in the latest React native version.

Steps to reproduce
  1. Create a ScrollView with contentInsetAdjustmentBehavior="automatic" and contentContainerStyle={{flexGrow: 1}}.
  2. Observe that the content container grows larger than the ScrollView's height, while the height is expected to match, because safe area insets would be accounted for.

See the Expo snack

React Native Version

0.75.3

Affected Platforms

Runtime - iOS

Output of npx react-native info
N/A — easy to reproduce
Stacktrace or Logs
N/A
Reproducer

https://snack.expo.dev/@louay/scrollview-layout-contentinset-issue

Screenshots and Videos

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

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

はじめの一歩

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

調査の方向性

リンクされた Expo Snack から始め、ScrollView、contentContainerStyle={{flexGrow: 1}}、contentInsetAdjustmentBehavior="automatic"、および automaticallyAdjustKeyboardInsets を使用して iOS の動作を再現します。完了条件は、コンテンツコンテナの高さが関連する inset を考慮し、ScrollView の高さを超えて拡張しないことです。

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

評価

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

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

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