[Android] `ScrollView` shows top margin on top of the content when reaching the end
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 127k
- Forks
- 25.3k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 4
Descripción
Description
When having a ScrollView with overflow: 'visible' and some marginTop, this margin is shown on top of the ScrollView content when the end of the ScrollView is reached.
I have been able to reproduce this on a Pixel 6 running Android 13 and Android 14, and on an emulator running Android 12.
It works fine on Android 11.
Demo
https://github.com/facebook/react-native/assets/6463569/fdbf5012-2564-4c7e-aaa1-9bd4111d779b
React Native Version
0.72.5
Output of npx react-native info
System:
OS: macOS 13.5
CPU: (10) arm64 Apple M1 Pro
Memory: 98.53 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 16.20.2
path: ~/.nvm/versions/node/v16.20.2/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 8.19.4
path: ~/.nvm/versions/node/v16.20.2/bin/npm
Watchman:
version: 2023.07.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.19
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/aitorcubelestorres/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.5
wanted: 0.72.5
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Steps to reproduce
- Create a new screen with a
ScrollView. - Fill it with enough content so that it is scrollable.
- Apply some
marginTopto theScrollView, and setoverflow: 'visible'. - Scroll down until you reach the end of the
ScrollView. - Hold the scroll position: see that the top margin of the
ScrollViewis shown on top of the content.
Snack, screenshot, or link to a repository
Repository: https://github.com/aitorct/ScrollViewOverflowMargin
Snack: https://snack.expo.dev/@aitorct/scrollviewoverflowmargin
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza ejecutando el repositorio vinculado ScrollViewOverflowMargin en Android 12–14 y reproduce el problema con overflow: 'visible' y marginTop. Compara el comportamiento al final del desplazamiento con Android 11 y, después, sigue la implementación de ScrollView de React Native para Android. Se considera terminado cuando el margen ya no aparece sobre el contenido al final y el comportamiento de desplazamiento indicado se mantiene intacto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- android, react-native
- Área
- mobile
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100