callstack / callstack/react-native-pager-view

setPage prevents Keyboard on Android

Ouverte
#514 6 commentaires 5 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
3.4k
Forks
476
Merge moyen
10 j 21 h
PR mergées (30 j)
2

Description

## Environment

"expo": "~44.0.0",
"react": "17.0.1",
"react-native": "0.64.3",
"react-native-pager-view": "5.4.9",

OS: Ubuntu 20.04
Device OS: Android 11

## Description

setPage prevents initial keyboard open on any PagerView child View except for the first and last.

In my testing, this only occurs on Android and only when the keyboard is not on screen when setPage is called. It does not occur when setPageWithoutAnimation is called or when a page is selected by gesture rather than calling setPage.

## Reproducible Demo

[Snack reproducing bug](https://snack.expo.dev/@aar2222/rn-pager-view-bug-android)

[Repo reproducing bug](https://github.com/adam-adair/rn-pager-view-bug-android)

To reproduce the bug, on an Android device:
- press buttons to navigate to second or third child Views.
- focus the TextInput. Keyboard will dismiss immediately. It can be opened with a second focus.
- The bug doesn't appear if the keyboard is on screen when the button is pressed or if the TextInput is on the first or last child View.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par le Snack ou le dépôt lié et reproduisez le problème sur un appareil Android en utilisant setPage, puis comparez-le avec setPageWithoutAnimation et la navigation par gestes. C’est terminé lorsqu’un TextInput situé dans un enfant intermédiaire de PagerView ouvre le clavier lors de son premier focus après une navigation programmatique.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
android, react-native, typescript
Domaine
mobile
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.