callstack / callstack/react-native-pager-view

setPage prevents Keyboard on Android

Aperta
#514 6 commenti 5 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
3.4k
Fork
476
Merge medio
10g 21h
PR unite (30g)
2

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia dallo Snack o dal repository collegato e riproduci il problema su un dispositivo Android usando setPage, quindi confrontalo con setPageWithoutAnimation e la navigazione tramite gesti. Il lavoro è completato quando un TextInput in un elemento figlio intermedio di PagerView apre la tastiera al primo focus dopo una navigazione programmatica.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
android, react-native, typescript
Ambito
mobile
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.