callstack / callstack/react-native-pager-view

Android: Keyboard gets closed immediately

オープン
#670 コメント 5 件 リアクション 11 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
3.4k
フォーク
476
平均マージ
10日 21時間
マージ済み PR(30日)
2

説明

## Environment
`"react-native-pager-view": "^6.1.2"`
`"react-native": "0.65.3"`
`"react-navigation": all packages 5.x.x`
`"react-native-screens": "3.4.0",` -> this is where usually this bug is solved but it didn't work for me

AndroidManifest.xml:
`android:windowSoftInputMode="adjustResize"` - I need this, otherwise adjustPan pushes the header as well when keyboard is opened

## Description
So after trying out many combinations and solutions, this is what I found.
Hope you can help me.

We have multi page apply form process.
This includes input on almost every screen.
Issue happens first time when I focus on input, it automatically closes.
I tried combinations when:

- Parent does not rerender and I only have 2 pages - It works as expected (but I will never have only 2 pages)
- Parent does not rerender and I there are more than 2 pages - keyboard opens and closes immediately
- Parent rerenders and I there are more than 2 pages - keyboard opens and closes immediately
- Tried with `collapsable` props, still the same

## Reproducible Demo

`viewPager?.current?.setPage(currentPage + 1)`

```











```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、記載されている React Native、react-native-pager-view、Android の設定を使用し、3ページの PagerView 例と setPage 呼び出しで問題を再現します。adjustResize および報告されている prop の組み合わせでキーボードの動作を比較します。完了の条件は、複数ページのフォームで最初に入力欄へフォーカスしたときにキーボードが開いたままになることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, react-native
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。