[iOS] setPage does not animate when the pager resizes with the keyboard
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ios, react-native, swift, typescript
調査の方向性
Read the iOS pager implementation and the focus-clearing change from #1193, then reproduce the two-command sequence in the Issue #1154 Page Change Focus Repro screen using a release build. Compare the pager's scroll frames with the keyboard closed and open to trace why the selection loses its animation after the layout pass. Done means repeated keyboard-up setPage calls slide while still landing on the requested page.
索引モデルが issue の本文から書いたものです。
説明
Environment
react-native-pager-view:main- React Native 0.88.0, new architecture
- iPhone 18 Pro simulator, iOS 27.0
Description
An imperative setPage does not animate when the pager's height changes while the command is in flight: the page changes instantly instead of sliding.
The resize is what breaks it, not the focus. Flipping a 40 pt spacer above the pager in the handler that calls setPage jumps the same way with no keyboard anywhere, and that part is not new. What #1193 changed is that an app no longer has to resize anything itself: leaving a page resigns its input, the keyboard closes, and a pager that sizes itself around the keyboard springs back to full height a frame after the command.
Counting the pager's scroll frames per command, where a slide reports about 18 and a jump 1, with the pager inside a KeyboardAvoidingView and an input focused before each of three moves: 1, 1, 1. Removing the blur that #1193 added to setPage, and nothing else, puts it back to a 230 ms slide a move. The keyboard then closes once the pager settles instead of during the command.
The heights at each step, from the pager's own layout pass:
setPage index=1 h=225
layout h=437 +17 ms
scroll h=225 x1
Reproducible Demo
<KeyboardAvoidingView behavior="padding" style={{ flex: 1 }}>
<Button title="Go 1" onPress={() => pagerRef.current?.setPage(1)} />
<PagerView ref={pagerRef} style={{ flex: 1 }}>
{/* one page per colour, each holding a TextInput */}
</PagerView>
</KeyboardAvoidingView>
- Focus the input on page 0 so the keyboard opens
- Tap Go 1
- The page changes with no slide. With the keyboard closed the same tap slides
The example screen resizes itself for an unrelated reason. Its Events: line wraps as the log grows and Go N clears it in the same handler as the command, so its steps do not isolate this one.
- 主要言語
- TypeScript
- スター
- 3.4k
- フォーク
- 491
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 51
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
callstack/react-native-pager-view のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
callstack/react-native-pager-view#1232 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[iOS] UIKit's scroll to a focused field can leave the pager between pages対応中かも @TaduJR が 2 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
callstack/react-native-pager-view#1230 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Resolution: Needs Repro
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
callstack/react-native-pager-view#1222 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
callstack/react-native-pager-view#1189 ·
メンテナーはふだん 1 日以内に返信
-
iOS: PagerScrollDelegate proxies to itself and overflows the stack when the weak originalDelegate dies対応中かも @lvlrSajjad が 56 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
callstack/react-native-pager-view#1146 ·
メンテナーはふだん 1 日以内に返信
callstack/react-native-pager-view の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
earendil-works/pi-claude-code#36 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Resources: New work of jabodetabek対応中かも @rmt-svc が今日担当しました。 オープンresources
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
railmapgen/rmp-gallery#4167 ·
メンテナーはふだん 2 日以内に返信
-
documentation p1
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
microsoft/monaco-editor#5577 ·
メンテナーはふだん 1 日以内に返信