`ScrollView` `contentContainerStyle`'s `flexGrow` doesn't account for `contentInsetAdjustmentBehavior` or `automaticallyAdjustKeyboardInsets`
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 127k
- Forks
- 25.3k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 4
Beschreibung
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
- Create a
ScrollViewwithcontentInsetAdjustmentBehavior="automatic"andcontentContainerStyle={{flexGrow: 1}}. - 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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem verlinkten Expo Snack und reproduziere das iOS-Verhalten mit ScrollView, contentContainerStyle={{flexGrow: 1}}, contentInsetAdjustmentBehavior="automatic" und automaticallyAdjustKeyboardInsets. Fertig ist die Aufgabe, wenn die Höhe des Content-Containers die relevanten Insets berücksichtigt, anstatt über die Höhe von ScrollView hinauszuwachsen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react-native
- Bereich
- mobile
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100