[iOS] The scroll position of the multiline TextInput affects the ScrollView auto-scroll when the keyboard opens/closes
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 127k
- Forks
- 25.3k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 4
Description
Description
On iOS, when using a ScrollView with automaticallyAdjustKeyboardInsets and a multiline TextInput, the scroll position of the TextInput affects how the ScrollView auto-scrolls when the keyboard opens or closes.
Steps to reproduce
<ScrollView automaticallyAdjustKeyboardInsets>
// Any content above the TextInput to position it at the bottom of the screen
<TextInput multiline style={{ height: 100 }} /> // multiline TextInput with fixed height and many lines of text (let say 20)
// More content to allow the ScrollView to scroll if needed
</ScrollView>
- ScrollView with automaticallyAdjustKeyboardInsets
- Content above the TextInput to fill the screen
- Multiline TextInput with fixed height and many lines of text
- Content below the TextInput to allow the ScrollView to scroll if needed
- Focus on the input and scroll it to the end
- Scroll the ScrollView to align the TextInput at the bottom of the screen
- Focus on the last line in the TextInput
- The keyboard slides up, and the ScrollView scrolls too much
- With the keyboard open, scroll the ScrollView to align the TextInput at the bottom of the screen (above the keyboard)
- Close the keyboard
- The ScrollView scrolls up
React Native Version
0.79.5
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
This is not relevant
Stacktrace or Logs
This is not relevant
MANDATORY Reproducer
Screenshots and Videos
https://github.com/user-attachments/assets/1566ea6e-e936-4670-a18a-80090857f58c
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le reproducer iOS Snack obligatoire et comparez le comportement de ScrollView et de multiline TextInput lors de l’ouverture et de la fermeture du clavier. Suivez la gestion de automaticallyAdjustKeyboardInsets, puis vérifiez que ScrollView ne défile plus trop loin à l’ouverture du clavier et ne se décale pas vers le haut à sa fermeture.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- ios, react-native
- Domaine
- mobile
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100