Repository navigation
feat: present Vertical Bars popovers from native SwiftUI buttons - #273
Conversation
| if (current) { | ||
| const connection = current; | ||
| current = undefined; | ||
| opening = opening.then(() => release(connection)).catch(console.error); | ||
| if (!connection.dismissed) return; |
There was a problem hiding this comment.
🔴 ポップオーバー内で開いた選択画面が消える
リレー中のポップオーバーで ion-select などを開くと、新しいオーバーレイの開始時に親の接続が解除されます。親の子 WebView が閉じられるため、選択画面も消えて操作できません。
Learn more
子 WebView にもオーバーレイの開始イベントを登録するため、内部の ion-select などが開くポップオーバーも present() に届きます。current が存在する場合、この分岐は新しいオーバーレイの所在を調べずに親を解放します。cleanup はその子 WebView を閉じるので、新しいオーバーレイも失われます。
Example: リレーしたポップオーバー内の ion-select を押すと、選択肢のポップオーバーが子 WebView で開き始めます。その開始イベントで親のリレーが終了し、選択肢を表示している WebView ごと閉じられます。
Recommended fix: 子ドキュメントで開始したオーバーレイについては、閉じる前にそのコンテンツとライフサイクルを元のドキュメントへ移すか、子オーバーレイが終了するまで WebView を維持してください。子と元のドキュメント双方での入れ子のオーバーレイを検証してください。
Was this helpful? React with 👍 or 👎 to provide feedback.
| for (const node of ancestors) { | ||
| const shell = destination.createElement(node.localName); | ||
| mirror(node, shell, true); | ||
| parent.append(shell); | ||
| parent = shell; |
Playwright test resultsDetails
Flaky testschromium › range-interaction.spec.ts › activeBarStart never shows a reflection on the wrong side in ltr |
|
📊 Ionic 9 Playwright Test Report View the detailed Ionic 9 report: https://rdlabo-dev.github.io/ionic-theme-ios27/pr-273/ Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run. |
npm beta publishedCI passed for the merge commit npm install @rdlabo/ionic-theme-ios27@1.2.1-beta.pr273.shae866fb1dca9f |
Opening an Ionic popover from a native Vertical Bars button currently retires the rail to Web rendering. This change keeps the existing native controls projected while presenting the live popover content from that button through SwiftUI.
This is a focused extraction of #260, based on current
main. The child WebView prepares concurrently with Ionic content initialization and the Web enter animation is bypassed. Only accepted Vertical Barsion-buttonanchors are eligible; ordinary toolbar/body popovers, modals, sheets and alerts keep their existing behavior.controls.popoveris opt-in and defaults to false.Ionic continues to own lifecycle, application handlers and dismissal. Missing native anchors or preparation failures restore the Web popover. A nested overlay, menu, page departure, resize or shell suspension releases the retained projection. The source WebView is neither resized nor reparented by this feature.
Backdrop dismissal keeps the live host until SwiftUI reports disappearance, and binding notifications are scoped to their owning anchor. A tap accepted by the same native anchor while Ionic is still dismissing is coalesced and replayed after cleanup, with the normal source/revision/disabled checks.
Cancellation before SwiftUI appears now settles the pending presentation and releases its model, so the next popover can open. Native dismissal rejection or timeout still completes Ionic’s dismissal lifecycle and preserves dismissal data/role.
The child document is initialized in standards mode and waits for copied stylesheets before presentation, preventing stretched Ionic buttons in WebKit.
Validation:
The existing preview limitations for arbitrary cross-document CSS and complete accessibility parity still apply. No package version change.