react / react/react-native

[Android] Texts and Modals are broken in Android Desktop/Computer Mode

未关闭
#56,129 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Component: Modal Needs: Triage :mag: Platform: Android
主要语言
C++
星标
127k
派生
25.3k
平均合并
1 天 23 小时
30 天内合并 PR
4

描述

Description

When connecting an Android device to an external display all Texts seem to collapse (the only exception is when a minHeight is forced) and Modals do not open in fullscreen.

Steps to reproduce
  1. Make a fresh 0.84.1 install
  2. Use the attached reproducer or create some Text and a Modal
  3. Verify on physical device everything works as expected
  4. Connect the device to an external display and choose Computer/Desktop mode
  5. Open the app on the display and you should see all broken Texts and the Modal that is shown incorrectly
React Native Version

0.84.1

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
System:
  OS: macOS 26.3
  CPU: (8) arm64 Apple M2
  Memory: 112.36 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.7.0
    path: /Users/XXX/.nvm/versions/node/v22.7.0/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: /Users/XXX/.nvm/versions/node/v22.7.0/bin/npm
  Watchman:
    version: 2022.11.28.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/XXX/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.2 AI-252.25557.131.2521.14344949
  Xcode:
    version: 26.2/17C52
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.16
    path: /usr/bin/javac
  Ruby:
    version: 2.7.5
    path: /Users/XXX/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.0
    wanted: 20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.84.1
    wanted: 0.84.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: false
Stacktrace or Logs
-
MANDATORY Reproducer

https://snack.expo.dev/@andreamartinez/android-computer-mode-bugs

Screenshots and Videos

This is how the reproducer appears on device:

Image

The Modal should look like this:

Image

Attach the device to an external display and choose "Computer" or "Desktop" depending on your device:

Image

Open the app and Text and Modals are broken in React Native 0.84.1:

https://github.com/user-attachments/assets/495a0490-46d6-4534-9c6d-f305dc22440e

Making the same test using React Native 0.73.1 everything looks fine:

https://github.com/user-attachments/assets/b513c32a-af72-4314-9cf1-0d52f14e137d

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 React Native 0.84.1 上必需的 Snack 复现程序开始,使用一台在 Computer/Desktop 模式下连接到外部显示器的 Android 设备,并与 0.73.1 进行比较。调查 Android 在该模式下对 Text 和 Modal 的运行时行为;完成的标准是 Text 正常渲染,并且 Modal 在外部显示器上以全屏方式打开。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, react-native
领域
mobile-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。