`showOverlay` creates a scene-less `UIWindow`, so overlays never appear under UIScene lifecycle

Đang mở
#8,345 2 bình luận 2 reaction 0 người được giao Xem trên GitHub

@yedidyak đang làm issue này rồi.

Từ ngày 2/11/2026.

  • #8374 của @yedidyak — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, react-native
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu từ phần triển khai native của Navigation.showOverlay và RNNOverlayWindow, đặc biệt là đường đi initWithFrame:, rồi so sánh với cách xử lý _mainWindow hiện có được setRoot sử dụng. Tái hiện bằng một UIWindowSceneDelegate và xác minh rằng cửa sổ overlay được liên kết với UIWindowScene host. Hoàn tất khi showOverlay xuất hiện phía trên root hiện tại trong khi hành vi hiện có của setRoot vẫn không thay đổi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

platform: iOS type: accepted/bug
What happened?

On iOS, Navigation.showOverlay() creates a new RNNOverlayWindow with initWithFrame: and never assigns a UIWindowScene.

With a scene-based app lifecycle, that window is not added to the scene, so the overlay never appears. JS still mounts and runs (the overlay VC is created and rendered), which makes this look like a hang: native/RNN splash dismisses, overlay logic is running, but the screen stays on RNNSplashScreenViewController / the current root.

Navigation.setRoot() is not affected, because it attaches the layout to the existing _mainWindow that the host already bound to the scene.

This is easy to miss on older iOS if the app still used the AppDelegate window path. It becomes a hard break once the app adopts UIWindowScene (mandatory on iOS 26+).

What was the expected behaviour?

showOverlay shows the overlay above the current root on the same UIWindowScene.

Was it tested on latest react-native-navigation?
  • I have tested this issue on the latest react-native-navigation release and it still reproduces.
Help us reproduce this issue!
  1. Use UIScene lifecycle (UIApplicationSceneManifest + UIWindowSceneDelegate).
  2. Create the window with initWithWindowScene: and pass it to RNN (delegate.window set before bootstrap).
  3. On Navigation.events().registerAppLaunchedListener, do not setRoot. Call:
Navigation.showOverlay({
  component: {
    name: 'example.OverlayScreen',
  },
});
  1. OverlayScreen mounts (componentDidMount / useEffect runs) but nothing is visible. The scene window is still RNNSplashScreenViewController.

Control: the same screen shown via setRoot appears correctly:

Navigation.setRoot({
  root: {
    stack: {
      children: [{ component: { name: 'example.OverlayScreen' } }],
    },
  },
});
In what environment did this happen?
  • react-native-navigation: 8.8.9
  • react-native: 0.87 (New Architecture / Fabric, bridgeless)
  • iOS: 26 / 27 (also repros conceptually on iOS 13+ with UIScene)
  • Host: RNNAppDelegate + custom UIWindowSceneDelegate
  • Platform: iOS only
Ngôn ngữ chính
MDX
Star
13.2k
Fork
2.6k
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wix/react-native-navigation

Tất cả issue của wix/react-native-navigation

Issue tương tự

Thêm issue về Mobile Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.