Issue when displaying a modal after dismissing another modal
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Description
Before RN 0.76.5, on iOS it was possible to show a modal and after dismissing it, showing another one.
Now, when doing the exact same thing on the old architecture the second modal is not showing up.
https://github.com/facebook/react-native/issues/47694
https://github.com/facebook/react-native/issues/48245
https://github.com/facebook/react-native/issues/48559
The error is not happening on new architecture
Steps to reproduce
- Create two different modals
- Show the first one by clicking on a button
- Then, create a button that will dismiss the first modal and display the second one
- The second one won't show up
React Native Version
0.76.5
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 15.2
CPU: (10) arm64 Apple M1 Max
Memory: 482.95 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.12.0
path: ~/.nvm/versions/node/v22.12.0/bin/node
Yarn: Not Found
npm:
version: 8.19.4
path: ~/code/yonitou/hygo/node_modules/.bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.11.2
path: /Users/yonitouboul/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2411.12071903
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.1
path: /usr/bin/javac
Ruby:
version: 2.7.4
path: /Users/yonitouboul/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
### Stacktrace or Logs
```text
No errors logs
Reproducer
https://github.com/yonitou/modal-bug
Screenshots and Videos
When I click on the button "Close modal", it should dismiss the red one and show the blue one but the blue one never shows.
You will notice that if enabling new architecture, the problem disappears
https://github.com/user-attachments/assets/72aca692-d90d-40f7-b500-ef574ae26658
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用旧架构和新架构运行链接的 yonitou/modal-bug 复现程序,并按照关闭两个 modal 的步骤操作。然后跟踪 React Native iOS modal 的呈现和关闭生命周期,以确定第二个 modal 在哪里丢失。完成标准是:在 iOS 上使用旧架构关闭第一个 modal 后第二个 modal 会出现,且不会导致新架构回归。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ios, react-native
- 领域
- mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100