[iOS] Page is blank after setPage when the screen re-renders on pager events
维护者通常 1 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- ios, react-native, typescript
调研方向
Start with the #1154 repro screen at example/src/gh-issues/Issue1154PageChangeFocusRepro.tsx and apply the two event-log changes described in the issue. Run the six-step sequence on an iOS simulator using version 9.0.10. The issue is resolved when page 2 remains visible after the final steps; linked pull request #1203 is already open.
由索引模型根据 Issue 内容生成。
描述
On iOS, the pager can show an empty page after setPage. The status line says the page is selected, but the pager area is empty: no text and no inputs. The page stays empty after the pager stops moving.
This surfaced while reviewing #1193 (the iOS focus fix). The repro screen in that PR triggers it. #1193 does not cause it, because the same steps show a blank page on 9.0.10 without that PR.
Repro
Use the #1154 repro screen (example/src/gh-issues/Issue1154PageChangeFocusRepro.tsx) on main, with two changes. Each change makes the event log above the pager change length when the pager changes page:
// In the "Go N" buttons, before setPage:
setEvents([]);
// On the PagerView:
onPageScrollStateChanged={(e) => {
if (e.nativeEvent.pageScrollState === 'idle') {
log('state idle');
}
}}
Then:
- Tap the input on page 0, type a few characters, and tap Go 1.
- Tap the input on page 1, type, and tap Go 2.
- Tap the input on page 2, type, and tap Go 1.
- Tap the input on page 1, type, and tap Go 0.
- Tap the input on page 0, type, and tap Go 1.
- Tap Go 2.
Expected: page 2 shows.
Actual: the status line says Selected: 2, but the pager area is empty.
Each part is needed. Without the two changes, without typing, without focusing the inputs, or without the first step, the page shows correctly.
Recording
https://github.com/user-attachments/assets/8381b1be-60ca-4cf6-b940-c5ebd8eb72eb
Versions: react-native-pager-view 9.0.10 (main at 4914ab6), iOS 26.5 simulator (iPhone 17 Pro Max), iOS only.
- 主要语言
- TypeScript
- 星标
- 3.4k
- 派生
- 490
- 平均合并
- 2 天 5 小时
- 30 天内合并 PR
- 34
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/react-native-pager-view 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 67/100
callstack/react-native-pager-view#1205 ·
维护者通常 1 天内回复
-
[Android/Fabric] setPageWithoutAnimation from useLayoutEffect is ignored when targeting a newly added page可能已有人在做 @Luccacvb 今天认领。 未关闭
难度 4/5 1-2 天 新手友好度 58/100
callstack/react-native-pager-view#1196 ·
维护者通常 1 天内回复
-
[iOS] Focused TextInput keeps focus and keyboard after switching pages (v9)可能已有人在做 @TaduJR 于 9 天前认领。 未关闭
难度 4/5 1-2 天 新手友好度 69/100
callstack/react-native-pager-view#1192 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 73/100
callstack/react-native-pager-view#1191 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 58/100
callstack/react-native-pager-view#1189 ·
维护者通常 1 天内回复
查看 callstack/react-native-pager-view 的全部 Issue
相似的 Issue
-
bug ui-dashboard
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 91/100
caelestia-dots/caelestia#534 · 1 条评论 ·
维护者通常 1 天内回复
-
area: scripts bug
难度 2/5 1-3 小时 新手友好度 76/100
tdk-landscape/tdk-cli-core#2706 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
bobadilla-tech/biasmarket.com#402 ·
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 88/100
javvadivijayprasad/sel2pw#28 ·