iOS(statusbar): `resizeWebView` shifts the web view down in resizable iPadOS 26 windows (`overlaysWebView: true`)

オープン 初心者向け
#2,639 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
70/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
ios, swift
領域
mobile

調査の方向性

Issueでは StatusBar.resizeWebView() がエントリーポイントとして示され、オーバーレイモードのオフセット処理も含まれています。このメソッドと周辺のiOSステータスバーコードを読み、関連するiOSテストを確認するか、上部のセーフエリアが10 ptあるサイズ変更可能なウィンドウのテストを追加してください。サイズ変更後もオーバーレイモードでWebViewがy = 0に保たれ、その上にバーが残らなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

triage

Plugin version: @capacitor/status-bar 8.0.4 (same code on 8.0.5 nightly), @capacitor/ios 8.6.0, iPadOS 26, app built with the iOS 26 SDK.

What happens
With overlaysWebView: true, after resizing the app window on iPad (windowed apps / Stage Manager) to a window that does not reach full height, a bar appears at the top of the window above the web view (black: the window background).

Cause
StatusBar.resizeWebView() runs 0.1 s after every viewWillTransition and, in overlay mode, does:

let safeAreaTop = webView.safeAreaInsets.top
if statusBarHeight >= safeAreaTop && safeAreaTop > 0 {
    webViewFrame.origin.y = safeAreaTop == 40 ? 20 : statusBarHeight - safeAreaTop
}

In a resizable iPadOS 26 window, statusBarManager.statusBarFrame stays 32 pt, while the window's top safe area is 10 pt for windows that are not full height (32 pt only at full height). The web view is moved to y = 22 and shortened by 22 pt. Measured on device:

window.frame=(0, 0, 1296, 787.5) window.safeArea.top=10 statusBarFrame.height=32
webView.frame (0, 0, 1296, 787.5) -> (0, 22, 1296, 765.5)

Proposed fix
In overlay mode the web view should cover the view controller's whole area; the page handles safe areas itself. The offset only served the pre-iOS 13 double-height status bar, which no supported iOS version has. Set origin.y = 0 for overlay mode.

主要言語
Java
スター
688
フォーク
690
平均マージ
16時間 15分
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/capacitor-plugins のほかの issue

ionic-team/capacitor-plugins の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。