[iOS, Fabric] measureInWindow stays off by the page sheet shrink offset after the sheet is dismissed
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- ios, react-native
- 領域
- mobile
調査の方向性
Start with the mandatory reproducer and compare its measurements before and after dismissing a page sheet; the plain React Native 0.88.0 run did not reproduce the issue. Then trace how Fabric's hosting view gets its window origin during layout on iOS. Done means reproducing and fixing the stale measurement in the reported navigation setup, with the value returning to its original y after dismissal.
索引モデルが issue の本文から書いたものです。
説明
Update: minimal app result. In a plain React Native 0.88.0 app on an iOS 27.0 simulator (iPhone 17, Modal pageSheet, no navigation library), the value stayed y=80 before and after the sheet was dismissed. The original report came from an app that uses react-native-screens 4.30.0 with a native stack, so the effect may depend on that navigation setup or on the device. The steps below are the original report.
Description
On iOS with Fabric, after a native page sheet (presentationStyle pageSheet) is presented and then dismissed, measureInWindow stays off by the shrink offset of the presenting screen. We measured 20 pt and 68 pt on an iPhone Air in portrait. The values are correct again after a layout of the root view, for example a rotation.
Likely cause (our reading): UIKit applies a transform to the presenting screen while the sheet is up. The surface hosting view takes its window origin from its frame in the window during layout, including that transform. After dismissal the transform is removed but the hosting view is not laid out again.
Related, different case: #58981 (centered formSheet on iPad, window inset missing from measureInWindow).
Steps to reproduce
- Render a View and call measureInWindow on it. Note the y value.
- Present a Modal with presentationStyle pageSheet, then dismiss it.
- Call measureInWindow again on the same view. Expected: the same y. Observed: y is off by the shrink offset.
- Rotate the device and measure again. The values are correct.
React Native Version
0.88.0 (Expo SDK 58.0.14, react-native-screens 4.30.0 in the app)
Affected Platforms
iOS
Output of npx @react-native-community/cli info
Not captured. The reproducer has not been run yet.
Stacktrace or Logs
None. The values are wrong without an error.
MANDATORY Reproducer
https://github.com/Acetyld/rn-measure-page-sheet-repro
Run result: in a plain RN 0.88.0 app on an iOS 27.0 simulator, the value stayed y=80 before and after the sheet. The effect may depend on the navigation setup or device.
Screenshots and Videos
None yet.
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.5k
- 平均マージ
- 3日 18時間
- マージ済み PR(30日)
- 188
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react/react-native のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
react/react-native#59945 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
react/react-native#59944 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
react/react-native#59942 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
react/react-native#59939 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
react/react-native#59929 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
react/react-native の issue をすべて見る
似ている issue
-
backlog
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
EchoTools/nevr-runtime#2385 ·
メンテナーはふだん 1 日以内に返信
-
type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
tensorflow/tflite-micro#3995 ·
メンテナーはふだん 1 日以内に返信
-
CPU update 1.31xオープンspeed-report
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
mw00/project-maya#961 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
not for AI lovers
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信