fix: refresh native controls after foreground and viewport changes - #233
Merged
Merged
Conversation
| await page.waitForTimeout(750); | ||
| const previous = await page.evaluate((event) => { | ||
| const snapshot = Capacitor.registerPlugin<ShellMock>('IonicNativeUIShell').updates.at(-1)!; | ||
| if (event === 'foreground') document.dispatchEvent(new Event('visibilitychange')); |
Contributor
Comment on lines
+1255
to
+1256
| else if (event === 'window-resize') window.dispatchEvent(new Event('resize')); | ||
| else window.visualViewport!.dispatchEvent(new Event('resize')); |
Contributor
Contributor
Playwright test resultsDetails
|
Contributor
|
📊 Ionic 9 Playwright Test Report View the detailed Ionic 9 report: https://rdlabo-dev.github.io/ionic-theme-ios27/pr-233/ Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run. |
Contributor
npm beta publishedCI passed for the merge commit npm install @rdlabo/ionic-theme-ios27@1.2.0-beta.pr233.sha647eef34274b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native controls can remain hidden after foregrounding or a viewport change when their control snapshot is unchanged: those events scheduled a measurement, but snapshot deduplication skipped the native update. Force a refresh on visibility restoration and window/visual-viewport resize, using the existing RAF and pending-update handling. Reset transient native rejections through the same refresh path.
The change is limited to the runtime and three regression cases. Each new case fails against the original implementation and passes with the fix. The exact reported iPhone Duo fold/foreground/portrait sequence has not yet been reproduced through CLI, so resolution of that full sequence remains unconfirmed.
Validation: