From d59e3415df06cb26a7dea688f6720ba228b775d5 Mon Sep 17 00:00:00 2001 From: Shane Date: Fri, 7 Aug 2026 10:34:28 -0700 Subject: [PATCH 01/10] fix(datetime): tear down ready state when an overlay dismisses (#31335) Issue number: resolves #31155, resolves #31143 --------- ## What is the current behavior? Currently, an `ion-datetime` inside a modal or popover shows the wrong month once the overlay is reopened. The selected day isn't visible, the previous month button does nothing, and picking a day from the grid lands on an unrelated date. Overlays move their host element into `ion-app` when presenting and back to its original position when dismissing, which disconnects and reconnects the datetime. `disconnectedCallback` reset `hasBeenIntersecting` during that move, so by the time the hidden-state `IntersectionObserver` entry arrived, `hiddenCallback` mistook the dismissal for the synthetic initial entry and returned early. That left `datetime-ready` on the host, so on the next present `markReady` saw the class and returned without re-centering the calendar on the working month, and the browser had already reset `scrollLeft` to 0 while the overlay was hidden. `scrollLeft: 0` renders the previous month's grid while the header still names the working month, which is what produces all three symptoms. ## What is the new behavior? With this change, `disconnectedCallback` no longer resets `hasBeenIntersecting`. That flag tracks the observers, and the observers are only created in `componentDidLoad` and never re-created on reconnect, so a DOM move has no business clearing it. `hiddenCallback` now sees the real hidden transition on dismiss and tears down as it did before #31108, which lets `markReady` run again on the next present and re-center the calendar. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Other information This regression was introduced in #31108. That PR needed the flag to make `hiddenCallback` ignore the synthetic initial entry, but the `disconnectedCallback` reset it also added had no job and broke the overlay case. Before #31108, `hiddenCallback` had no guard at all and always removed `datetime-ready` on dismiss, so this restores the behavior that shipped for all of v8.. - [Relevant test screen - iOS](https://ionic-framework-git-fix-31155-ionic1.vercel.app/src/components/datetime-button/test/overlays?ionic:mode=ios) - [Relevant test screen - MD](https://ionic-framework-git-fix-31155-ionic1.vercel.app/src/components/datetime-button/test/overlays?ionic:mode=md) To reproduce: open the "Modal - Default" picker, dismiss it, then open it again. On `main` the grid shows February while the header reads March 2022. --------- Co-authored-by: Maria Hutt --- core/src/components.d.ts | 4 +- .../test/overlays/datetime-button.e2e.ts | 107 +++++++++++++++++- core/src/components/datetime/datetime.tsx | 7 +- 3 files changed, 113 insertions(+), 5 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 269256c1ccc..173a0537548 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -929,7 +929,7 @@ export namespace Components { */ "clearText": string; /** - * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). + * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, refer to [theming](/docs/theming/basics). * @default 'primary' */ "color"?: Color; @@ -6198,7 +6198,7 @@ declare namespace LocalJSX { */ "clearText"?: string; /** - * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). + * The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, refer to [theming](/docs/theming/basics). * @default 'primary' */ "color"?: Color; diff --git a/core/src/components/datetime-button/test/overlays/datetime-button.e2e.ts b/core/src/components/datetime-button/test/overlays/datetime-button.e2e.ts index a626dd90855..16050dbbf1b 100644 --- a/core/src/components/datetime-button/test/overlays/datetime-button.e2e.ts +++ b/core/src/components/datetime-button/test/overlays/datetime-button.e2e.ts @@ -1,6 +1,6 @@ import type { Locator } from '@playwright/test'; import { expect } from '@playwright/test'; -import type { EventSpy } from '@utils/test/playwright'; +import type { E2EPage, EventSpy } from '@utils/test/playwright'; import { configs, test } from '@utils/test/playwright'; /** @@ -207,3 +207,108 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { }); }); }); + +/** + * This behavior does not vary across modes/directions + */ +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('datetime-button: reopening modal'), () => { + let datetime: Locator; + let modal: Locator; + let monthYear: Locator; + let ionModalDidPresent: EventSpy; + let ionModalDidDismiss: EventSpy; + + test.beforeEach(async ({ page }) => { + await page.setContent( + ` + + + + + + `, + config + ); + + datetime = page.locator('ion-datetime'); + modal = page.locator('ion-modal'); + monthYear = datetime.locator('.calendar-month-year'); + ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss'); + }); + + const openModal = async (page: E2EPage) => { + await page.click('#date-button'); + await ionModalDidPresent.next(); + await page.locator('ion-datetime.datetime-ready').waitFor(); + await page.waitForChanges(); + }; + + const dismissModal = async () => { + await modal.evaluate((el: HTMLIonModalElement) => el.dismiss()); + await ionModalDidDismiss.next(); + }; + + test('should keep the selected day in view when reopened', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31155', + }); + + const selectedDay = datetime.locator('.calendar-day-active'); + + await openModal(page); + await expect(selectedDay).toBeInViewport(); + + await dismissModal(); + await openModal(page); + + await expect(selectedDay).toBeInViewport(); + }); + + test('should navigate to the previous month when reopened', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31155', + }); + + await openModal(page); + await dismissModal(); + await openModal(page); + + await expect(monthYear).toHaveText('March 2022'); + + await datetime.locator('.calendar-next-prev ion-button').first().click(); + + await expect(monthYear).toHaveText('February 2022'); + }); + + test('should select a day from the month shown in the header when reopened', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31155', + }); + + await openModal(page); + await dismissModal(); + await openModal(page); + + await expect(monthYear).toHaveText('March 2022'); + + const ionChange = await page.spyOnEvent('ionChange'); + + /** + * Click the middle of the calendar instead of a day by name so Playwright + * doesn't scroll the target into view and hide a wrong scroll position. + */ + const calendarBody = (await datetime.locator('.calendar-body').boundingBox())!; + await page.mouse.click(calendarBody.x + calendarBody.width / 2, calendarBody.y + calendarBody.height / 2); + await ionChange.next(); + + const value = await datetime.evaluate((el: HTMLIonDatetimeElement) => el.value as string); + expect(value).toMatch(/^2022-03-/); + await expect(monthYear).toHaveText('March 2022'); + }); + }); +}); diff --git a/core/src/components/datetime/datetime.tsx b/core/src/components/datetime/datetime.tsx index 8604f05130b..fa3ac113890 100644 --- a/core/src/components/datetime/datetime.tsx +++ b/core/src/components/datetime/datetime.tsx @@ -140,6 +140,10 @@ export class Datetime implements ComponentInterface { * Set true only by `visibleCallback`. Lets `hiddenCallback` ignore the * synthetic "not intersecting" entry IntersectionObserver fires on * `observe()` when the host mounts offscreen. + * + * Don't reset this in `disconnectedCallback`. Overlays disconnect and + * reconnect the host without re-creating the observers, so a reset there + * makes `hiddenCallback` miss the dismissal. */ private hasBeenIntersecting = false; @@ -179,7 +183,7 @@ export class Datetime implements ComponentInterface { /** * The color to use from your application's color palette. * Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. - * For more information on colors, see [theming](/docs/theming/basics). + * For more information on colors, refer to [theming](/docs/theming/basics). */ @Prop() color?: Color = 'primary'; @@ -1116,7 +1120,6 @@ export class Datetime implements ComponentInterface { this.clearFocusVisible = undefined; } this.loadTimeoutCleanup(); - this.hasBeenIntersecting = false; } /** From 2a006b88a09365e2857c18e8e548036d70f863b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:12:10 -0700 Subject: [PATCH 02/10] chore(deps): update github/codeql-action action to v4.37.5 (#31323) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github/codeql-action](https://redirect.github.com/github/codeql-action) | action | patch | `v4.37.4` → `v4.37.5` | --- ### Release Notes
github/codeql-action (github/codeql-action) ### [`v4.37.5`](https://redirect.github.com/github/codeql-action/compare/v4.37.4...v4.37.5) [Compare Source](https://redirect.github.com/github/codeql-action/compare/v4.37.4...v4.37.5)
--- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "every weekday before 11am" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/ionic-team/ionic-framework). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 38b60de26dd..6c763af3e27 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,7 +15,7 @@ jobs: security-events: write steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4 + - uses: github/codeql-action/init@d1ba80a13dd99fba24a470575428917156a28b43 # v4.37.5 with: languages: javascript - - uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4 + - uses: github/codeql-action/analyze@d1ba80a13dd99fba24a470575428917156a28b43 # v4.37.5 From 02ac43d6580009c820d36d992fe8801531256175 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Aug 2026 06:20:54 -0700 Subject: [PATCH 03/10] chore(deps): update github/codeql-action action to v4.37.6 (#31340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github/codeql-action](https://redirect.github.com/github/codeql-action) | action | patch | `v4.37.5` → `v4.37.6` | --- ### Release Notes
github/codeql-action (github/codeql-action) ### [`v4.37.6`](https://redirect.github.com/github/codeql-action/releases/tag/v4.37.6) [Compare Source](https://redirect.github.com/github/codeql-action/compare/v4.37.5...v4.37.6) - Changed the default filepath for the new remote file address format that was introduced in CodeQL Action 4.37.0 / 3.37.0 to `.github/codeql-config.yml` to align it with the suggested path that is used elsewhere. [#​4070](https://redirect.github.com/github/codeql-action/pull/4070)
--- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "every weekday before 11am" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/ionic-team/ionic-framework). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6c763af3e27..0e27f252903 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -15,7 +15,7 @@ jobs: security-events: write steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: github/codeql-action/init@d1ba80a13dd99fba24a470575428917156a28b43 # v4.37.5 + - uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 with: languages: javascript - - uses: github/codeql-action/analyze@d1ba80a13dd99fba24a470575428917156a28b43 # v4.37.5 + - uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6 From a73e1831d389e6dc968f646c0322b3984c1d3224 Mon Sep 17 00:00:00 2001 From: Shane Date: Mon, 10 Aug 2026 11:18:17 -0700 Subject: [PATCH 04/10] fix(core): resolve lazy component chunks under Vite 8 (#31341) Issue number: resolves #31333 --------- ## What is the current behavior? Currently, Stencil's lazy loader resolves component bundles with a template literal dynamic import wrapped in a `/* @vite-ignore */` comment. Vite 8 moved dependency prebundling from esbuild to Rolldown, which honors that comment and leaves the import alone, so the `.entry.js` chunks never get emitted into the prebundle output. Requests for them 404 and no lazy component registers, which surfaces as `Constructor for "ion-app#undefined" was not found` in the console. Angular CLI 22.1 is where most people hit this, since its dev server is the first to ship Vite 8. It only affects the lazy `IonicModule` path, because that's the only thing in the repo that pulls `@ionic/core/loader`. Standalone components import from `@ionic/core/components` and never touch the loader. ## What is the new behavior? With this change we set `extras.enableImportInjection` in `core/stencil.config.ts`. Stencil prepends a switch of literal import paths to the loader, ahead of the existing `@vite-ignore` import, so Rolldown can resolve each bundle and emit its chunk. The original import stays as the fallback, so nothing changes for consumers that already worked. The fix is one config flag that would silently revert if anyone dropped it, so there's a guard alongside it. `core/scripts/verify/lazy-imports.js` reads the built `dist/esm` and `dist/cjs`, locates the loader chunk, and fails if any bundle is missing a literal import. It runs in both `build-core` and `build-core-stencil-prerelease`, so a Stencil upgrade that changes the injection behavior fails the nightly rather than shipping. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Other information Verified against a stock Angular CLI 22.1 app using `IonicModule.forRoot()` and a local build of this branch. Before the fix we had a ton of 404s on `ion-app_8.entry.js` and `ion-button_2.entry.js`, plus some `Constructor for ... was not found` errors. After the fix we had no console errors, components render fine, and `ng build` emits the entry chunks with the right names. CI doesn't cover the actual symptom and it cannot here because we have no ng22 test apps on main, but we'll have it tested for free on major-9.0 with the existing ng22 test app there. The guard script asserts the build-output invariant for the extra validation. The injected switch adds roughly 10.8 KB raw to the lazy runtime chunk, which is under 1 KB gzipped because the case clauses are near-identical repeated text, but people using the CDN build will have no extra overhead at all. Anyone on a published `@ionic/core` can work around this with `prebundle.exclude` in `angular.json` until it ships: ```json "serve": { "options": { "prebundle": { "exclude": ["@ionic/angular", "@ionic/core"] } } } ``` --- .../build-core-stencil-prerelease/action.yml | 4 ++ .../workflows/actions/build-core/action.yml | 4 ++ core/package.json | 3 +- core/scripts/verify/lazy-imports.js | 56 +++++++++++++++++++ core/stencil.config.ts | 6 ++ 5 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 core/scripts/verify/lazy-imports.js diff --git a/.github/workflows/actions/build-core-stencil-prerelease/action.yml b/.github/workflows/actions/build-core-stencil-prerelease/action.yml index 7a51a5df2d6..8cc7016349f 100644 --- a/.github/workflows/actions/build-core-stencil-prerelease/action.yml +++ b/.github/workflows/actions/build-core-stencil-prerelease/action.yml @@ -25,6 +25,10 @@ runs: run: npm run build -- --ci --debug --verbose working-directory: ./core shell: bash + - name: 🔍 Verify Lazy Imports + run: npm run test.lazy-imports + working-directory: ./core + shell: bash - uses: ./.github/workflows/actions/upload-archive with: name: ionic-core diff --git a/.github/workflows/actions/build-core/action.yml b/.github/workflows/actions/build-core/action.yml index 2ac2fd00836..523b303139a 100644 --- a/.github/workflows/actions/build-core/action.yml +++ b/.github/workflows/actions/build-core/action.yml @@ -27,6 +27,10 @@ runs: run: npm run build -- --ci working-directory: ./core shell: bash + - name: 🔍 Verify Lazy Imports + run: npm run test.lazy-imports + working-directory: ./core + shell: bash - uses: ./.github/workflows/actions/upload-archive with: name: ionic-core diff --git a/core/package.json b/core/package.json index 7145248f915..59789c45b23 100644 --- a/core/package.json +++ b/core/package.json @@ -99,7 +99,8 @@ "test.e2e.update-snapshots": "npm run test.e2e -- --update-snapshots='changed'", "test.watch": "jest --watch --no-cache", "test.treeshake": "node scripts/treeshaking.js dist/index.js", - "validate": "npm run lint && npm run test && npm run build && npm run test.treeshake", + "test.lazy-imports": "node scripts/verify/lazy-imports.js", + "validate": "npm run lint && npm run test && npm run build && npm run test.lazy-imports && npm run test.treeshake", "docker.build": "docker build -t ionic-playwright .", "test.e2e.docker": "npm run docker.build && node ./scripts/docker.mjs", "test.e2e.docker.update-snapshots": "npm run test.e2e.docker -- --update-snapshots='changed'", diff --git a/core/scripts/verify/lazy-imports.js b/core/scripts/verify/lazy-imports.js new file mode 100644 index 00000000000..d0008130474 --- /dev/null +++ b/core/scripts/verify/lazy-imports.js @@ -0,0 +1,56 @@ +/** + * Fails if the built lazy loader is missing a literal import path for any component bundle. + * Not in `scripts/testing/` because `vercel-build.sh` publishes that directory. + * https://github.com/ionic-team/ionic-framework/issues/31333 + */ +const fs = require('fs'); +const path = require('path'); + +const PACKAGE_ROOT = path.resolve(__dirname, '..', '..'); +const OUTPUT_DIRS = ['dist/esm', 'dist/cjs']; + +function main() { + const failures = OUTPUT_DIRS.map(verify).filter((message) => message !== null); + + if (failures.length > 0) { + failures.forEach((message) => console.error(message)); + process.exit(1); + } + + console.error(`Success! Every lazy bundle is imported by path in ${OUTPUT_DIRS.join(' and ')}`); +} + +function verify(dir) { + const resolved = path.join(PACKAGE_ROOT, dir); + + if (!fs.existsSync(resolved)) { + return `${dir} does not exist. Run npm run build first.`; + } + + const files = fs.readdirSync(resolved).filter((file) => file.endsWith('.js')); + const entries = files.filter((file) => file.endsWith('.entry.js')); + + if (entries.length === 0) { + return `${dir} does not contain any .entry.js files.`; + } + + // A non-loader chunk that happens to name an entry file would be a false pass. + const loader = files + .filter((file) => !file.endsWith('.entry.js')) + .map((file) => fs.readFileSync(path.join(resolved, file), 'utf-8')) + .find((source) => /switch\s*\(bundleId\)/.test(source)); + + if (loader === undefined) { + return `${dir} has no lazy loader with a bundle id switch. Check that extras.enableImportInjection is still set in core/stencil.config.ts.`; + } + + const missing = entries.filter((entry) => !loader.includes(`'./${entry}'`) && !loader.includes(`"./${entry}"`)); + + if (missing.length > 0) { + return `${dir} is missing an import for ${missing.length} of ${entries.length} lazy bundles: ${missing.join(', ')}`; + } + + return null; +} + +main(); diff --git a/core/stencil.config.ts b/core/stencil.config.ts index 8a090b65bff..948c5bff4a9 100644 --- a/core/stencil.config.ts +++ b/core/stencil.config.ts @@ -274,5 +274,11 @@ export const config: Config = { * the default behavior (slated for a future Stencil major version). */ experimentalScopedSlotChanges: true, + /** + * Vite 8 / Rolldown honors the `@vite-ignore` comment on the lazy loader's dynamic import + * and never emits the `.entry.js` chunks, so requests for them 404. This flag prepends a + * switch of literal import paths those bundlers can resolve. + */ + enableImportInjection: true, } }; From d6202a8933ad77735fceca05cb4b0fe6b33bfb55 Mon Sep 17 00:00:00 2001 From: Shane Date: Mon, 10 Aug 2026 12:18:22 -0700 Subject: [PATCH 05/10] fix(modal): allow pull-to-refresh with a custom scroll host (#31339) Issue number: resolves #31332 --------- ## What is the current behavior? Currently, pulling down inside a sheet or card modal dismisses the modal instead of triggering the refresher when the content uses a custom scroll host. ## What is the new behavior? With this change, the gesture resolves the refresher from the enclosing `ion-content` when the swipe target is a custom scroll host, so pulling down runs the refresher and leaves the modal alone. The new `findRefresherInContent` util only reports a refresher for the scroll host that refresher actually scrolls with, which is the first one in the content, so a second unrelated scroll host still swipes the modal normally. The `expandToScroll: false` path now runs the same check. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Other information Test coverage is 4 e2e tests on the new page: [Test page (iOS)](https://ionic-framework-git-fix-31332-ionic1.vercel.app/src/components/modal/test/refresher-scroll-target/?ionic:mode=ios) [Test page (MD)](https://ionic-framework-git-fix-31332-ionic1.vercel.app/src/components/modal/test/refresher-scroll-target/?ionic:mode=md) ## Current dev build: ``` 8.8.18-dev.11786385944.17aca7e5 ``` --- core/src/components/modal/gestures/sheet.ts | 49 ++--- .../modal/gestures/swipe-to-close.ts | 35 +--- core/src/components/modal/gestures/utils.ts | 19 ++ core/src/components/modal/modal.tsx | 11 +- .../test/refresher-scroll-target/index.html | 136 +++++++++++++ .../test/refresher-scroll-target/modal.e2e.ts | 189 ++++++++++++++++++ .../components/modal/test/sheet/modal.e2e.ts | 69 +++++++ core/src/components/refresher/refresher.tsx | 3 +- core/src/utils/content/content.utils.spec.ts | 63 ++++++ core/src/utils/content/index.ts | 35 ++++ 10 files changed, 548 insertions(+), 61 deletions(-) create mode 100644 core/src/components/modal/test/refresher-scroll-target/index.html create mode 100644 core/src/components/modal/test/refresher-scroll-target/modal.e2e.ts diff --git a/core/src/components/modal/gestures/sheet.ts b/core/src/components/modal/gestures/sheet.ts index cacf61c5b43..163be3beadd 100644 --- a/core/src/components/modal/gestures/sheet.ts +++ b/core/src/components/modal/gestures/sheet.ts @@ -7,7 +7,7 @@ import type { Animation, ModalDragEventDetail } from '../../../interface'; import type { GestureDetail } from '../../../utils/gesture'; import { getBackdropValueForSheet } from '../utils'; -import { calculateSpringStep, handleCanDismiss } from './utils'; +import { calculateSpringStep, canSwipeOnContent, handleCanDismiss } from './utils'; export interface MoveSheetToBreakpointOptions { /** @@ -82,6 +82,8 @@ export const createSheetGesture = ( }; const contentEl = baseEl.querySelector('ion-content'); + // Cache the initial value so the gesture restores it instead of forcing scrolling on. + const initialContentScrollY = contentEl?.scrollY ?? true; const height = wrapperEl.clientHeight; let currentBreakpoint = initialBreakpoint; let offset = 0; @@ -261,9 +263,6 @@ export const createSheetGesture = ( const canStart = (detail: GestureDetail) => { /** - * If we are swiping on the content, swiping should only be possible if the content - * is scrolled all the way to the top so that we do not interfere with scrolling. - * * We cannot assume that the `ion-content` target will remain consistent between swipes. * For example, when using ion-nav within a modal it is possible to swipe, push a view, * and then swipe again. The target content will not be the same between swipes. @@ -272,27 +271,11 @@ export const createSheetGesture = ( currentBreakpoint = getCurrentBreakpoint(); /** - * If `expandToScroll` is disabled, we should not allow the swipe gesture - * to start if the content is not scrolled to the top. + * Upwards swipes on the content cannot move the sheet anyway, so this only + * blocks swiping the sheet down from the content. */ - if (!expandToScroll && contentEl) { - const scrollEl = isIonContent(contentEl) ? getElementRoot(contentEl).querySelector('.inner-scroll') : contentEl; - return scrollEl!.scrollTop === 0; - } - - if (currentBreakpoint === 1 && contentEl) { - /** - * The modal should never swipe to close on the content with a refresher. - * Note 1: We cannot solve this by making this gesture have a higher priority than - * the refresher gesture as the iOS native refresh gesture uses a scroll listener in - * addition to a gesture. - * - * Note 2: Do not use getScrollElement here because we need this to be a synchronous - * operation, and getScrollElement is asynchronous. - */ - const scrollEl = isIonContent(contentEl) ? getElementRoot(contentEl).querySelector('.inner-scroll') : contentEl; - const hasRefresherInContent = !!contentEl.querySelector('ion-refresher'); - return !hasRefresherInContent && scrollEl!.scrollTop === 0; + if (contentEl && (!expandToScroll || currentBreakpoint === 1)) { + return canSwipeOnContent(contentEl); } return true; @@ -562,14 +545,14 @@ export const createSheetGesture = ( } /** - * Enables scrolling immediately if the sheet is about to fully expand - * or if it allows scrolling at any breakpoint. Without this, there would + * Restores the content's scroll setting immediately if the sheet is about to + * fully expand or if it allows scrolling at any breakpoint. Without this, there would * be a ~500ms delay while the modal animation completes, causing a * noticeable lag. Native iOS allows scrolling as soon as the gesture is * released, so we align with that behavior. */ if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || !expandToScroll)) { - contentEl.scrollY = true; + contentEl.scrollY = initialContentScrollY; } /** @@ -768,8 +751,20 @@ export const createSheetGesture = ( onEnd, }); + /** + * Puts the content back the way the app declared it. A sheet can dismiss + * without going through moveSheetToBreakpoint, and an inline modal reuses + * the same element on the next present. + */ + const resetContentScroll = () => { + if (contentEl) { + contentEl.scrollY = initialContentScrollY; + } + }; + return { gesture, moveSheetToBreakpoint, + resetContentScroll, }; }; diff --git a/core/src/components/modal/gestures/swipe-to-close.ts b/core/src/components/modal/gestures/swipe-to-close.ts index d04220c88e7..f5b753d8b01 100644 --- a/core/src/components/modal/gestures/swipe-to-close.ts +++ b/core/src/components/modal/gestures/swipe-to-close.ts @@ -1,7 +1,7 @@ import { getTimeGivenProgression } from '@utils/animation/cubic-bezier'; import { isIonContent, findClosestIonContent, disableContentScrollY, resetContentScrollY } from '@utils/content'; import { createGesture } from '@utils/gesture'; -import { clamp, getElementRoot } from '@utils/helpers'; +import { clamp } from '@utils/helpers'; import { OVERLAY_GESTURE_PRIORITY } from '@utils/overlays'; import type { Animation, ModalDragEventDetail } from '../../../interface'; @@ -9,7 +9,7 @@ import type { GestureDetail } from '../../../utils/gesture'; import type { Style as StatusBarStyle } from '../../../utils/native/status-bar'; import { setCardStatusBarDark, setCardStatusBarDefault } from '../utils'; -import { calculateSpringStep, handleCanDismiss } from './utils'; +import { calculateSpringStep, canSwipeOnContent, handleCanDismiss } from './utils'; // Defaults for the card swipe animation export const SwipeToCloseDefaults = { @@ -35,7 +35,6 @@ export const createSwipeToCloseGesture = ( let isOpen = false; let canDismissBlocksGesture = false; let contentEl: HTMLElement | null = null; - let scrollEl: HTMLElement | null = null; const canDismissMaxStep = 0.2; let initialScrollY = true; let lastStep = 0; @@ -60,12 +59,6 @@ export const createSwipeToCloseGesture = ( } /** - * If we are swiping on the content, - * swiping should only be possible if - * the content is scrolled all the way - * to the top so that we do not interfere - * with scrolling. - * * We cannot assume that the `ion-content` * target will remain consistent between * swipes. For example, when using @@ -76,29 +69,7 @@ export const createSwipeToCloseGesture = ( */ contentEl = findClosestIonContent(target); if (contentEl) { - /** - * The card should never swipe to close - * on the content with a refresher. - * Note: We cannot solve this by making the - * swipeToClose gesture have a higher priority - * than the refresher gesture as the iOS native - * refresh gesture uses a scroll listener in - * addition to a gesture. - * - * Note: Do not use getScrollElement here - * because we need this to be a synchronous - * operation, and getScrollElement is - * asynchronous. - */ - if (isIonContent(contentEl)) { - const root = getElementRoot(contentEl); - scrollEl = root.querySelector('.inner-scroll'); - } else { - scrollEl = contentEl; - } - - const hasRefresherInContent = !!contentEl.querySelector('ion-refresher'); - return !hasRefresherInContent && scrollEl!.scrollTop === 0; + return canSwipeOnContent(contentEl); } /** diff --git a/core/src/components/modal/gestures/utils.ts b/core/src/components/modal/gestures/utils.ts index 694227d630d..270341719a8 100644 --- a/core/src/components/modal/gestures/utils.ts +++ b/core/src/components/modal/gestures/utils.ts @@ -1,7 +1,26 @@ +import { findRefresherInContent, isIonContent } from '@utils/content'; +import { getElementRoot } from '@utils/helpers'; import { GESTURE } from '@utils/overlays'; import type { Animation } from '../../../interface'; +/** + * Swiping is only possible when the content is scrolled to the top, so that we + * do not interfere with scrolling, and never on content with a refresher. + * + * Note: We cannot solve the refresher case with gesture priority as the iOS + * native refresh gesture uses a scroll listener in addition to a gesture. + * + * Note: Do not use `getScrollElement` here because we need this to be a + * synchronous operation, and `getScrollElement` is asynchronous. + */ +export const canSwipeOnContent = (contentEl: HTMLElement) => { + const scrollEl = isIonContent(contentEl) ? getElementRoot(contentEl).querySelector('.inner-scroll') : contentEl; + const hasRefresherInContent = !!findRefresherInContent(contentEl); + + return !hasRefresherInContent && scrollEl!.scrollTop === 0; +}; + export const handleCanDismiss = async (el: HTMLIonModalElement, animation: Animation) => { /** * If canDismiss is not a function diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index b3a728b0ccf..ea9b8140b70 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -93,6 +93,7 @@ export class Modal implements ComponentInterface, OverlayInterface { private sortedBreakpoints?: number[]; private keyboardOpenCallback?: () => void; private moveSheetToBreakpoint?: (options: MoveSheetToBreakpointOptions) => Promise; + private resetSheetContentScroll?: () => void; private inheritedAttributes: Attributes = {}; private statusBarStyle?: StatusBarStyle; @@ -779,7 +780,7 @@ export class Modal implements ComponentInterface, OverlayInterface { ani.progressStart(true, 1); - const { gesture, moveSheetToBreakpoint } = createSheetGesture( + const { gesture, moveSheetToBreakpoint, resetContentScroll } = createSheetGesture( this.el, this.backdropEl!, wrapperEl, @@ -803,6 +804,7 @@ export class Modal implements ComponentInterface, OverlayInterface { this.gesture = gesture; this.moveSheetToBreakpoint = moveSheetToBreakpoint; + this.resetSheetContentScroll = resetContentScroll; this.gesture.enable(true); @@ -1029,6 +1031,13 @@ export class Modal implements ComponentInterface, OverlayInterface { if (this.gesture) { this.gesture.destroy(); } + /** + * The sheet gesture turns content scrolling off while the sheet sits below + * the top breakpoint. Inline modals reuse the same content on the next + * present, so hand it back before the gesture goes away. + */ + this.resetSheetContentScroll?.(); + this.resetSheetContentScroll = undefined; this.cleanupViewTransitionListener(); this.cleanupParentRemovalObserver(); this.cleanupSafeAreaOverrides(); diff --git a/core/src/components/modal/test/refresher-scroll-target/index.html b/core/src/components/modal/test/refresher-scroll-target/index.html new file mode 100644 index 00000000000..12206de68df --- /dev/null +++ b/core/src/components/modal/test/refresher-scroll-target/index.html @@ -0,0 +1,136 @@ + + + + + Modal - Refresher with Custom Scroll Target + + + + + + + + + + + + + + + +
+ + + Refresher with Custom Scroll Target + + + + + + + + + + +
+
+ + + + diff --git a/core/src/components/modal/test/refresher-scroll-target/modal.e2e.ts b/core/src/components/modal/test/refresher-scroll-target/modal.e2e.ts new file mode 100644 index 00000000000..c2950ec5e03 --- /dev/null +++ b/core/src/components/modal/test/refresher-scroll-target/modal.e2e.ts @@ -0,0 +1,189 @@ +import { expect } from '@playwright/test'; +import type { E2EPage } from '@utils/test/playwright'; +import { configs, dragElementByYAxis, test } from '@utils/test/playwright'; + +const dragDownOnScrollHost = async (page: E2EPage, dragByY = 250) => { + // The refresher creates its gesture asynchronously, so wait for it to hydrate. + await page.locator('ion-modal ion-refresher.hydrated').waitFor({ state: 'attached' }); + + const scrollHost = page.locator('ion-modal .ion-content-scroll-host'); + const box = (await scrollHost.boundingBox())!; + + // Start near the top of the host so the drag stays within smaller viewports. + await dragElementByYAxis(scrollHost, page, dragByY, box.y + 5); +}; + +/** + * This behavior does not vary across directions. + */ +configs({ directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('sheet modal: refresher with custom scroll target'), () => { + test.beforeEach(async ({ page }) => { + await page.goto('/src/components/modal/test/refresher-scroll-target', config); + }); + + test('should refresh instead of dismissing when pulling down on the custom scroll target', async ({ + page, + }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31332', + }); + + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss'); + const ionRefresh = await page.spyOnEvent('ionRefresh'); + + await page.click('#sheet'); + await ionModalDidPresent.next(); + + await dragDownOnScrollHost(page); + + await ionRefresh.next(); + expect(ionModalDidDismiss).toHaveReceivedEventTimes(0); + }); + + test('should refresh instead of dismissing when expandToScroll is disabled', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31332', + }); + + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss'); + const ionRefresh = await page.spyOnEvent('ionRefresh'); + + await page.click('#sheet-no-expand'); + await ionModalDidPresent.next(); + + await dragDownOnScrollHost(page); + + await ionRefresh.next(); + expect(ionModalDidDismiss).toHaveReceivedEventTimes(0); + }); + + test('should move the sheet rather than refresh when dragging the content at a partial breakpoint', async ({ + page, + }) => { + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionBreakpointDidChange = await page.spyOnEvent('ionBreakpointDidChange'); + const ionRefresh = await page.spyOnEvent('ionRefresh'); + + await page.click('#sheet-breakpoints'); + await ionModalDidPresent.next(); + + await dragDownOnScrollHost(page); + + await ionBreakpointDidChange.next(); + expect(ionRefresh).toHaveReceivedEventTimes(0); + }); + + test('should refresh rather than move the sheet at a partial breakpoint when expandToScroll is disabled', async ({ + page, + }) => { + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionBreakpointDidChange = await page.spyOnEvent('ionBreakpointDidChange'); + const ionRefresh = await page.spyOnEvent('ionRefresh'); + + await page.click('#sheet-breakpoints-no-expand'); + await ionModalDidPresent.next(); + + await dragDownOnScrollHost(page); + + await ionRefresh.next(); + expect(ionBreakpointDidChange).toHaveReceivedEventTimes(0); + }); + + test('should keep the content opted out of scrolling after the sheet snaps back', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31332', + }); + + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionBreakpointDidChange = await page.spyOnEvent('ionBreakpointDidChange'); + const ionRefresh = await page.spyOnEvent('ionRefresh'); + + await page.click('#sheet-breakpoints'); + await ionModalDidPresent.next(); + + const content = page.locator('ion-modal ion-content'); + await expect(content).toHaveJSProperty('scrollY', false); + + /** + * Expanding to the top breakpoint is what used to force scrolling back on. + * Waiting on the breakpoint change also proves the drag moved the sheet, so + * this cannot pass by leaving the content untouched. + */ + const wrapper = (await page.locator('ion-modal .modal-wrapper').boundingBox())!; + await dragElementByYAxis(page.locator('ion-modal .modal-handle'), page, -Math.round(wrapper.height * 0.3)); + await ionBreakpointDidChange.next(); + + await expect(content).toHaveJSProperty('scrollY', false); + + await dragDownOnScrollHost(page); + + await ionRefresh.next(); + }); + + test('should keep the content opted out of scrolling when expandToScroll is disabled', async ({ page }) => { + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + + await page.click('#sheet-breakpoints-no-expand'); + await ionModalDidPresent.next(); + + const content = page.locator('ion-modal ion-content'); + await expect(content).toHaveJSProperty('scrollY', false); + + // With expandToScroll disabled the sheet restores scrolling at every breakpoint. + await dragElementByYAxis(page.locator('ion-modal .modal-handle'), page, 60); + + await expect(content).toHaveJSProperty('scrollY', false); + }); + + test('should still dismiss when dragging the handle', async ({ page }) => { + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss'); + + await page.click('#sheet-no-expand'); + await ionModalDidPresent.next(); + + await dragElementByYAxis(page.locator('ion-modal .modal-handle'), page, 500); + + await ionModalDidDismiss.next(); + }); + }); +}); + +/** + * Card modals are only available in iOS mode. + * This behavior does not vary across directions. + */ +configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('card modal: refresher with custom scroll target'), () => { + test.beforeEach(async ({ page }) => { + await page.goto('/src/components/modal/test/refresher-scroll-target', config); + }); + + test('should refresh instead of dismissing when pulling down on the custom scroll target', async ({ + page, + }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31332', + }); + + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss'); + const ionRefresh = await page.spyOnEvent('ionRefresh'); + + await page.click('#card'); + await ionModalDidPresent.next(); + + await dragDownOnScrollHost(page); + + await ionRefresh.next(); + expect(ionModalDidDismiss).toHaveReceivedEventTimes(0); + }); + }); +}); diff --git a/core/src/components/modal/test/sheet/modal.e2e.ts b/core/src/components/modal/test/sheet/modal.e2e.ts index 06f2f7f7a98..74e6e13431e 100644 --- a/core/src/components/modal/test/sheet/modal.e2e.ts +++ b/core/src/components/modal/test/sheet/modal.e2e.ts @@ -127,6 +127,20 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => expect(breakpoint).toBe(0.5); }); + test('should give scrolling back to the content when expanded to the top breakpoint', async ({ page }) => { + const ionBreakpointDidChange = await page.spyOnEvent('ionBreakpointDidChange'); + const modal = page.locator('.modal-sheet'); + const content = modal.locator('ion-content'); + + // The sheet starts partially open, so the content doesn't scroll yet. + await expect(content).toHaveJSProperty('scrollY', false); + + await modal.evaluate((el: HTMLIonModalElement) => el.setCurrentBreakpoint(1)); + await ionBreakpointDidChange.next(); + + await expect(content).toHaveJSProperty('scrollY', true); + }); + test('should emit ionBreakpointDidChange', async ({ page }) => { const ionBreakpointDidChange = await page.spyOnEvent('ionBreakpointDidChange'); const modal = page.locator('.modal-sheet'); @@ -157,6 +171,61 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => }); }); + test('it should restore content scrolling on dismiss so a reused modal still scrolls', async ({ page }) => { + await page.goto('/src/components/modal/test/sheet', config); + + await page.setContent( + ` + + Open + + + Dismiss + + + + + `, + config + ); + + const modal = page.locator('ion-modal'); + const content = modal.locator('ion-content'); + const openButton = page.locator('#open-modal'); + const dismissButton = page.locator('#dismiss'); + + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + const ionModalDidDismiss = await page.spyOnEvent('ionModalDidDismiss'); + const ionBreakpointDidChange = await page.spyOnEvent('ionBreakpointDidChange'); + + await openButton.click(); + await ionModalDidPresent.next(); + + // Below the top breakpoint, so the sheet has turned content scrolling off. + await expect(content).toHaveJSProperty('scrollY', false); + + await dismissButton.click(); + await ionModalDidDismiss.next(); + + /** + * An inline modal reuses this content on the next present. Leaving it + * switched off means the re-presented sheet reads that as the app's own + * setting and never scrolls again. + */ + await expect(content).toHaveJSProperty('scrollY', true); + + await openButton.click(); + await ionModalDidPresent.next(); + + await modal.evaluate((el: HTMLIonModalElement) => el.setCurrentBreakpoint(1)); + await ionBreakpointDidChange.next(); + + await expect(content).toHaveJSProperty('scrollY', true); + }); + test('it should reset the breakpoint value on dismiss', async ({ page }) => { await page.goto('/src/components/modal/test/sheet', config); test.info().annotations.push({ diff --git a/core/src/components/refresher/refresher.tsx b/core/src/components/refresher/refresher.tsx index be838aa9c4a..ecd27fd0965 100644 --- a/core/src/components/refresher/refresher.tsx +++ b/core/src/components/refresher/refresher.tsx @@ -2,6 +2,7 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core'; import { Component, Element, Event, Host, Method, Prop, State, Watch, h, readTask, writeTask } from '@stencil/core'; import { getTimeGivenProgression } from '@utils/animation/cubic-bezier'; import { + findRefresherScrollHost, getScrollElement, ION_CONTENT_CLASS_SELECTOR, ION_CONTENT_ELEMENT_SELECTOR, @@ -526,7 +527,7 @@ export class Refresher implements ComponentInterface { * or the background content element. */ componentOnReady(contentEl, async () => { - const customScrollTarget = contentEl.querySelector(ION_CONTENT_CLASS_SELECTOR); + const customScrollTarget = findRefresherScrollHost(contentEl); /** * Query the custom scroll target (if available), first. In refresher implementations, * the ion-refresher element will always be a direct child of ion-content (slot="fixed"). By diff --git a/core/src/utils/content/content.utils.spec.ts b/core/src/utils/content/content.utils.spec.ts index a9be0a6139f..95b674b7f02 100644 --- a/core/src/utils/content/content.utils.spec.ts +++ b/core/src/utils/content/content.utils.spec.ts @@ -4,6 +4,7 @@ import { printIonContentErrorMsg, findClosestIonContent, findIonContent, + findRefresherInContent, getScrollElement, } from './index'; @@ -48,6 +49,68 @@ describe('Content Utils', () => { }); }); + describe('findRefresherInContent', () => { + const createContent = ({ hasRefresher = true, scrollHostCount = 0 } = {}) => { + const content = document.createElement('ion-content'); + + if (hasRefresher) { + const refresher = document.createElement('ion-refresher'); + refresher.setAttribute('slot', 'fixed'); + content.appendChild(refresher); + } + + for (let i = 0; i < scrollHostCount; i++) { + const scrollHost = document.createElement('div'); + scrollHost.classList.add('ion-content-scroll-host'); + content.appendChild(scrollHost); + } + + return content; + }; + + it('should find the refresher within ion-content', () => { + const content = createContent(); + + expect(findRefresherInContent(content)).toBe(content.querySelector('ion-refresher')); + }); + + it('should return null when ion-content has no refresher', () => { + const content = createContent({ hasRefresher: false }); + + expect(findRefresherInContent(content)).toBe(null); + }); + + it('should find the refresher from a custom scroll host that is a sibling of it', () => { + const content = createContent({ scrollHostCount: 1 }); + const scrollHost = content.querySelector('.ion-content-scroll-host')!; + + expect(findRefresherInContent(scrollHost)).toBe(content.querySelector('ion-refresher')); + }); + + it('should find the refresher from an element nested within the custom scroll host', () => { + const content = createContent({ scrollHostCount: 1 }); + const nested = document.createElement('div'); + content.querySelector('.ion-content-scroll-host')!.appendChild(nested); + + expect(findRefresherInContent(nested)).toBe(content.querySelector('ion-refresher')); + }); + + it('should return null for a custom scroll host the refresher does not scroll with', () => { + const content = createContent({ scrollHostCount: 2 }); + const secondScrollHost = content.querySelectorAll('.ion-content-scroll-host')[1]; + + expect(findRefresherInContent(secondScrollHost)).toBe(null); + }); + + it('should return null for a custom scroll host that is not within an ion-content', () => { + const scrollHost = document.createElement('div'); + scrollHost.classList.add('ion-content-scroll-host'); + scrollHost.appendChild(document.createElement('ion-refresher')); + + expect(findRefresherInContent(scrollHost)).toBe(null); + }); + }); + describe('scrollToTop', () => { describe('scroll duration is 0', () => { it('should call scrollToTop when the tag name is ion-content', () => { diff --git a/core/src/utils/content/index.ts b/core/src/utils/content/index.ts index 44a6f7bff13..3c4f0967592 100644 --- a/core/src/utils/content/index.ts +++ b/core/src/utils/content/index.ts @@ -58,6 +58,41 @@ export const findClosestIonContent = (el: Element) => { return el.closest(ION_CONTENT_SELECTOR); }; +/** + * Queries the custom scroll host an `ion-refresher` scrolls with in the given + * `ion-content`. A refresher only pairs with the first host. + */ +export const findRefresherScrollHost = (ionContent: Element) => { + return ionContent.querySelector(ION_CONTENT_CLASS_SELECTOR); +}; + +/** + * Queries the `ion-refresher` that scrolls with the given content element, + * which may be an `ion-content` or a custom scroll host. A refresher is a + * `slot="fixed"` child of `ion-content`, so it is a sibling of a scroll host + * rather than a descendant of it. + */ +export const findRefresherInContent = (contentEl: Element) => { + // An `ion-content` owns any refresher inside it, scroll host or not. + if (isIonContent(contentEl)) { + return contentEl.querySelector('ion-refresher'); + } + + // A refresher needs an `ion-content` ancestor to initialize. + const ionContent = contentEl.closest(ION_CONTENT_ELEMENT_SELECTOR); + if (ionContent === null) { + return null; + } + + // Any scroll host other than the refresher's own has no refresher. + const refresherScrollHost = findRefresherScrollHost(ionContent); + if (refresherScrollHost === null || !refresherScrollHost.contains(contentEl)) { + return null; + } + + return ionContent.querySelector('ion-refresher'); +}; + /** * Scrolls to the top of the element. If an `ion-content` is found, it will scroll * using the public API `scrollToTop` with a duration. From 625f9c38ad8c5db8a6c12df5c1622a36da90f9e3 Mon Sep 17 00:00:00 2001 From: Zac Smucker-Bryan <111775722+Zac-Smucker-Bryan@users.noreply.github.com> Date: Mon, 10 Aug 2026 14:52:33 -0500 Subject: [PATCH 06/10] docs(testing): improve standalone testing documentation (#31313) Issue number: resolves #31312 --------- ## What is the current behavior? Current docs don't provide recommended testing guidance for accurately testing standalone components. This can create issues because a standalone (custom-elements) build doesn't expose `el.componentOnReady()`, so any test that reads fixture.nativeElement before hydration in a standalone project has the potential to not be testing what they think they are. ## What is the new behavior? - Adds a couple of sentences to talk about using the existing `componentOnReady` helper from `@ionic/core` in Angular's `testing.md` file - Adds the same standalone guidance to the `testing.md` files for React and Vue ## Does this introduce a breaking change? - [ ] Yes - [x] No --------- Co-authored-by: Maria Hutt --- docs/angular/testing.md | 4 ++++ docs/react/testing.md | 6 ++++++ docs/vue/testing.md | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/docs/angular/testing.md b/docs/angular/testing.md index 841839a998d..39d1121222e 100644 --- a/docs/angular/testing.md +++ b/docs/angular/testing.md @@ -90,6 +90,10 @@ Tests for lazy loaded Ionic UI components should only be added under the `/lazy` Tests for standalone Ionic UI components should only be added under the `/standalone` route. This allows for an isolated environment where the lazy loaded `IonicModule` is not initialized. The standalone components use Stencil's custom element bundle instead of the lazy loaded bundle. If `IonicModule` is initialized then the Stencil components will fall back to using the lazy loaded implementation instead of the custom elements bundle implementation. +### Waiting for Ionic Components + +Use the `componentOnReady` helper exported from `@ionic/core` rather than calling `el.componentOnReady()` directly. That method only exists on lazy loaded elements, so a direct call throws under the `/standalone` route. The helper covers both: under `/lazy` it awaits the element's own `componentOnReady()` promise, and under `/standalone` it waits one animation frame, giving the component's inner contents a chance to render. + ## Adding New Test Apps As we add support for new versions of Angular, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: diff --git a/docs/react/testing.md b/docs/react/testing.md index 1c9da9c6829..0def2f136d3 100644 --- a/docs/react/testing.md +++ b/docs/react/testing.md @@ -43,6 +43,12 @@ If you want to add a version-specific change, add the change inside of the appro If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. +### Testing Ionic Components + +`@ionic/react` imports every component through `defineCustomElement` from `@ionic/core/components`, so every test runs against the custom elements build. + +These test apps are Cypress only, and Cypress retries assertions until they pass, so there is nothing to wait on manually today. If we add unit tests that assert against rendered DOM, use the `componentOnReady` helper exported from `@ionic/core` rather than calling `el.componentOnReady()` directly. That method does not exist on custom elements, so the direct call throws. The helper waits one animation frame instead, giving the component's inner contents a chance to render. + ## Adding New Test Apps As we add support for new versions of React, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: diff --git a/docs/vue/testing.md b/docs/vue/testing.md index 268628f2ea5..f65f3459591 100644 --- a/docs/vue/testing.md +++ b/docs/vue/testing.md @@ -46,6 +46,14 @@ If you want to add a version-specific change, add the change inside of the appro If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y. +### Testing Ionic Components + +`@ionic/vue` imports every component through `defineCustomElement` from `@ionic/core/components`, so every test runs against the custom elements build. + +These test apps are Cypress only, and Cypress retries assertions until they pass, so there is nothing to wait on manually today. If we add unit tests that assert against rendered DOM, use the `componentOnReady` helper exported from `@ionic/core` rather than calling `el.componentOnReady()` directly. That method does not exist on custom elements, so the direct call throws. The helper waits one animation frame instead, giving the component's inner contents a chance to render. + +When testing Ionic components, use the exported `componentOnReady` helper from `@ionic/core` instead of calling `el.componentOnReady()` directly. The helper works with both lazy-loaded and custom-element builds, making it more likely the component has finished rendering before making assertions against its rendered DOM or running accessibility tests. + ## Adding New Test Apps As we add support for new versions of Vue, we will also need to update this directory to test against new applications. The following steps can serve as a guide for adding new apps: From f07bf57f99b9b1b0a4702dd7b9cc05aea09850bc Mon Sep 17 00:00:00 2001 From: Maria Hutt Date: Wed, 12 Aug 2026 19:42:54 +0000 Subject: [PATCH 07/10] chore(renovate): keep playwright Dockerfile and package.json in lockstep (#31310) Issue number: N/A --------- ## What is the current behavior? The Playwright npm packages and the `mcr.microsoft.com/playwright` Docker image in `core/Dockerfile` are tracked by two separate Renovate managers. The Docker image is published to the container registry about a day after the npm release, so the two updates become available at different times. Because they are on different datasources, the npm bump opens a PR before the Docker tag is ready, and getting the Dockerfile into the same PR requires a manual rebase once the image lands. This is easy to miss, and merging the npm bump alone leaves `core/package.json` and `core/Dockerfile` on mismatched Playwright versions. ## What is the new behavior? - A custom manager now resolves the `core/Dockerfile` Playwright image tag from the npm `@playwright/test` release instead of the container registry, so both files bump from the same version. - The built-in Docker manager for that image is disabled so it no longer produces a separate, lagging update. - The Dockerfile is added to the grouped `playwright` rule, and a `minimumReleaseAge` of 3 days lets the matching image publish before the PR opens. - Net result is a single `playwright` PR that updates `core/package.json` and `core/Dockerfile` together, with no manual rebase. ## Does this introduce a breaking change? - [ ] Yes - [ ] No ## Other information This is a Renovate config change only, so it will not take effect until the next scheduled Renovate run. If the Docker image for a given release has not been published yet when CI runs, the Dockerfile build can fail on a missing tag; the fix is to wait for the image to appear and re-run the job, with no code change needed. This is documented inline in `renovate.json5`. --- renovate.json5 | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index a25638f407e..d50c442adff 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -41,18 +41,41 @@ matchPackageNames: ["@playwright/test", "@axe-core/playwright", "playwright-core"], groupName: "playwright", matchFileNames: [ - "core/package.json" + "core/package.json", + "core/Dockerfile" ], - "rangeStrategy": "bump" + "rangeStrategy": "bump", + /** + * The mcr.microsoft.com/playwright Docker image is usually published + * about a day after the npm release. Waiting a few days before opening + * the PR gives the image time to appear, so the Dockerfile bump has a + * valid tag to point at. Both files are driven by the npm datasource + * (refer to customManagers below), so they always bump together. + * + * If the Docker build still fails because the tag does not exist yet, + * the image has not been published for this release. To fix it, confirm + * the image is available, then re-run the failed CI job. No code change + * is needed because the tag is already correct; the registry just needs + * time to catch up. + */ + minimumReleaseAge: "3 days" }, { + /** + * The built-in Docker manager tracks the mcr.microsoft.com/playwright tag + * against the container registry, which lags the npm release by about a day. + * That lag decouples the Dockerfile from the npm bump: the update either + * arrives as its own PR or has to be folded into the grouped PR with a + * manual rebase. Disable it and drive the tag from the npm datasource + * instead (refer to customManagers below) so the Dockerfile and + * core/package.json bump together. + */ matchDatasources: ["docker"], matchPackageNames: ["mcr.microsoft.com/playwright"], - groupName: "playwright", matchFileNames: [ "core/Dockerfile" ], - versioning: "semver" + enabled: false }, { matchPackagePatterns: ["ionicons"], @@ -107,6 +130,22 @@ groupName: "node-version-updates" } ], + customManagers: [ + { + /** + * Bump the Playwright Docker image tag in core/Dockerfile from the npm + * @playwright/test release instead of the container registry. The image + * tag mirrors the npm version (for example v1.62.0), so this keeps the + * Dockerfile and core/package.json in lockstep within a single PR. + */ + customType: "regex", + managerFilePatterns: ["core/Dockerfile"], + matchStrings: ["mcr\\.microsoft\\.com/playwright:v(?\\S+)"], + depNameTemplate: "@playwright/test", + datasourceTemplate: "npm", + versioningTemplate: "npm" + } + ], dependencyDashboard: false, rebaseWhen: "never", schedule: ["every weekday before 11am"], From bc4fce218d6c3aaac69f11d416b9fc8c8dacdfa4 Mon Sep 17 00:00:00 2001 From: Shane Date: Wed, 12 Aug 2026 20:53:44 +0000 Subject: [PATCH 08/10] fix(core): update offsets when safe-area insets arrive late (#31343) Issue number: resolves #31337 --------- ## What is the current behavior? Currently, `ion-content` caches its fullscreen offsets and only recomputes them on load, a `window` resize, `ionTabBarLoaded`, or `recalculateDimensions()`. A change to `--ion-safe-area-top` fires none of those, so on Android edge-to-edge, where the real inset only arrives once the native WindowInsets callback has run, the fullscreen scroll region and `#background-content` stay short by the inset and leave a gap behind a translucent header. Sheet modals have the same problem: `--ion-modal-offset-top` is a resolved pixel value written at present time, so a sheet presented before the inset is known stays too tall. ## What is the new behavior? Fullscreen `ion-content` now observes its own box with a `ResizeObserver`, which works because the content flexes to fill whatever space the headers and footers leave behind. The callback keeps the `offsetParent === null` guard from `onResize()`, since a hidden page reports a 0x0 box and recomputing then would zero the offsets, but it skips that method's 100ms debounce, which left the offsets visibly wrong for a small amount of time. Sheet modals subscribe to `onRootSafeAreaTopChange()`, a hidden probe element whose `height` tracks `var(--ion-safe-area-top)` so a change to the variable becomes an observable size change. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Other information The preview pages won't show the bug on their own, since it needs the inset to change after load. Run `document.documentElement.style.setProperty('--ion-safe-area-top', '24px')` in the console to trigger it. - [Fullscreen content (iOS)](https://ionic-framework-git-fix-31337-ionic1.vercel.app/src/components/content/test/fullscreen?ionic:mode=ios) / [Fullscreen content (MD)](https://ionic-framework-git-fix-31337-ionic1.vercel.app/src/components/content/test/fullscreen?ionic:mode=md) - [Modal safe-area (iOS)](https://ionic-framework-git-fix-31337-ionic1.vercel.app/src/components/modal/test/safe-area?ionic:mode=ios) / [Modal safe-area (MD)](https://ionic-framework-git-fix-31337-ionic1.vercel.app/src/components/modal/test/safe-area?ionic:mode=md) --- core/src/components/content/content.tsx | 72 ++++++- .../content/test/safe-area/content.e2e.ts | 194 ++++++++++++++++++ core/src/components/modal/modal.tsx | 21 +- core/src/components/modal/safe-area-utils.ts | 39 ++++ .../modal/test/safe-area/modal.e2e.ts | 56 +++++ 5 files changed, 375 insertions(+), 7 deletions(-) create mode 100644 core/src/components/content/test/safe-area/content.e2e.ts diff --git a/core/src/components/content/content.tsx b/core/src/components/content/content.tsx index b981a323dcf..b0673b414d5 100644 --- a/core/src/components/content/content.tsx +++ b/core/src/components/content/content.tsx @@ -1,5 +1,18 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core'; -import { Build, Component, Element, Event, Host, Listen, Method, Prop, forceUpdate, h, readTask } from '@stencil/core'; +import { + Build, + Component, + Element, + Event, + Host, + Listen, + Method, + Prop, + Watch, + forceUpdate, + h, + readTask, +} from '@stencil/core'; import { componentOnReady, hasLazyBuild, inheritAriaAttributes } from '@utils/helpers'; import type { Attributes } from '@utils/helpers'; import { isPlatform } from '@utils/platform'; @@ -34,6 +47,7 @@ export class Content implements ComponentInterface { private backgroundContentEl?: HTMLElement; private isMainContent = true; private resizeTimeout: ReturnType | null = null; + private fullscreenResizeObserver?: ResizeObserver; private inheritedAttributes: Attributes = {}; private tabsElement: HTMLElement | null = null; @@ -77,6 +91,11 @@ export class Content implements ComponentInterface { */ @Prop() fullscreen = false; + @Watch('fullscreen') + fullscreenChanged() { + this.setupFullscreenResizeObserver(); + } + /** * Controls where the fixed content is placed relative to the main content * in the DOM. This can be used to control the order in which fixed elements @@ -168,6 +187,14 @@ export class Content implements ComponentInterface { closestTabs.addEventListener('ionTabBarLoaded', this.tabsLoadCallback); } } + + // Re-observe on reattach, since componentDidLoad only fires once. + this.setupFullscreenResizeObserver(); + } + + componentDidLoad() { + // The custom elements build assigns fullscreen after connectedCallback. + this.setupFullscreenResizeObserver(); } disconnectedCallback() { @@ -193,6 +220,49 @@ export class Content implements ComponentInterface { clearTimeout(this.resizeTimeout); this.resizeTimeout = null; } + + this.destroyFullscreenResizeObserver(); + } + + /** + * Header and footer sizes can change after load without a window resize + * firing, so the `resize` listener alone misses those changes. + * + * Popover content is excluded because `contain: none` lets its offsets drive + * the host's own height, which would feed back into the observer. + */ + private setupFullscreenResizeObserver() { + if (!Build.isBrowser || typeof ResizeObserver === 'undefined') { + return; + } + + if (!this.fullscreen || hostContext('ion-popover', this.el)) { + this.destroyFullscreenResizeObserver(); + return; + } + + if (this.fullscreenResizeObserver !== undefined) { + return; + } + + this.fullscreenResizeObserver = new ResizeObserver(() => { + // A hidden page reports a 0x0 box, which would zero the offsets. Same + // reasoning as the guard in onResize, minus its debounce so the + // correction lands in the next frame instead of 100ms later. + if (this.el.offsetParent === null) { + return; + } + + this.resize(); + }); + this.fullscreenResizeObserver.observe(this.el); + } + + private destroyFullscreenResizeObserver() { + if (this.fullscreenResizeObserver !== undefined) { + this.fullscreenResizeObserver.disconnect(); + this.fullscreenResizeObserver = undefined; + } } /** diff --git a/core/src/components/content/test/safe-area/content.e2e.ts b/core/src/components/content/test/safe-area/content.e2e.ts new file mode 100644 index 00000000000..f28a872fb1f --- /dev/null +++ b/core/src/components/content/test/safe-area/content.e2e.ts @@ -0,0 +1,194 @@ +import { expect } from '@playwright/test'; +import { configs, test } from '@utils/test/playwright'; + +/** + * ion-content does not have mode-specific styling + */ +configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { + test.describe(title('content: safe-area'), () => { + test('should keep the scroll region flush with the viewport when the safe area top changes after load', async ({ + page, + }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31337', + }); + + await page.setContent( + ` + + + + + Header + + + + +

Content

+
+
+ `, + config + ); + + const scrollRegion = page.locator('ion-content .inner-scroll'); + const expectFlushWithTop = () => + expect(async () => { + expect(Math.abs((await scrollRegion.boundingBox())!.y)).toBeLessThanOrEqual(1); + }).toPass({ timeout: 5000 }); + + await expectFlushWithTop(); + + await page.evaluate(() => document.documentElement.style.setProperty('--ion-safe-area-top', '24px')); + + await expectFlushWithTop(); + }); + + test('should keep the scroll region flush with the viewport when the safe area bottom changes after load', async ({ + page, + }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31337', + }); + + await page.setContent( + ` + + + +

Content

+
+ + + + Footer + + +
+ `, + config + ); + + const scrollRegion = page.locator('ion-content .inner-scroll'); + const viewportHeight = page.viewportSize()!.height; + const expectFlushWithBottom = () => + expect(async () => { + const box = (await scrollRegion.boundingBox())!; + expect(Math.abs(box.y + box.height - viewportHeight)).toBeLessThanOrEqual(1); + }).toPass({ timeout: 5000 }); + + await expectFlushWithBottom(); + + await page.evaluate(() => document.documentElement.style.setProperty('--ion-safe-area-bottom', '24px')); + + await expectFlushWithBottom(); + }); + + test('should recompute the offsets when fullscreen is enabled after load', async ({ page }) => { + await page.setContent( + ` + + + + Header + + + + +

Content

+
+
+ `, + config + ); + + const content = page.locator('ion-content'); + const scrollRegion = page.locator('ion-content .inner-scroll'); + const expectFlushWithTop = () => + expect(async () => { + expect(Math.abs((await scrollRegion.boundingBox())!.y)).toBeLessThanOrEqual(1); + }).toPass({ timeout: 5000 }); + + await content.evaluate((el: HTMLIonContentElement) => (el.fullscreen = true)); + await expectFlushWithTop(); + + // Only the observer created by the fullscreen watcher can catch this. + await page.evaluate(() => document.documentElement.style.setProperty('--ion-safe-area-top', '24px')); + + await expectFlushWithTop(); + }); + + test('should leave the offsets at zero when fullscreen is disabled after load', async ({ page }) => { + await page.setContent( + ` + + + + Header + + + + +

Content

+
+
+ `, + config + ); + + const content = page.locator('ion-content'); + const offsetTop = () => content.evaluate((el) => el.style.getPropertyValue('--offset-top')); + + await content.evaluate((el: HTMLIonContentElement) => (el.fullscreen = false)); + + await expect(async () => { + expect(await offsetTop()).toBe('0px'); + }).toPass({ timeout: 5000 }); + + await page.evaluate(() => document.documentElement.style.setProperty('--ion-safe-area-top', '24px')); + await page.waitForTimeout(300); + + expect(await offsetTop()).toBe('0px'); + }); + + test('should keep the offsets while the page is hidden', async ({ page }) => { + await page.setContent( + ` + +
+ + + Header + + + + +

Content

+
+
+
+ `, + config + ); + + const content = page.locator('ion-content'); + const scrollRegion = page.locator('ion-content .inner-scroll'); + const offsetTop = () => content.evaluate((el) => el.style.getPropertyValue('--offset-top')); + + await expect(async () => { + expect(Math.abs((await scrollRegion.boundingBox())!.y)).toBeLessThanOrEqual(1); + }).toPass({ timeout: 5000 }); + + const beforeHiding = await offsetTop(); + expect(beforeHiding).toBe(`${Math.round((await page.locator('ion-header').boundingBox())!.height)}px`); + + await page.evaluate(() => document.getElementById('page')!.classList.add('ion-page-hidden')); + // Long enough that a missed visibility guard would have committed by now. + await page.waitForTimeout(300); + + expect(await offsetTop()).toBe(beforeHiding); + }); + }); +}); diff --git a/core/src/components/modal/modal.tsx b/core/src/components/modal/modal.tsx index ea9b8140b70..0b6c1be162f 100644 --- a/core/src/components/modal/modal.tsx +++ b/core/src/components/modal/modal.tsx @@ -50,6 +50,7 @@ import { applySafeAreaOverrides, clearSafeAreaOverrides, getRootSafeAreaTop, + onRootSafeAreaTopChange, hasCustomModalDimensions, type ModalSafeAreaContext, } from './safe-area-utils'; @@ -110,6 +111,7 @@ export class Modal implements ComponentInterface, OverlayInterface { private currentViewIsPortrait?: boolean; private viewTransitionAnimation?: Animation; private resizeTimeout?: any; + private unsubscribeRootSafeAreaTop?: () => void; // Mutation observer to watch for parent removal private parentRemovalObserver?: MutationObserver; @@ -1480,17 +1482,21 @@ export class Modal implements ComponentInterface, OverlayInterface { // Set the internal offset property with the resolved root safe-area-top value if (context.isSheetModal) { this.updateSheetOffsetTop(); + this.unsubscribeRootSafeAreaTop = onRootSafeAreaTopChange((safeAreaTop) => + this.updateSheetOffsetTop(safeAreaTop) + ); } } /** - * Resolves the current root --ion-safe-area-top value and sets the - * internal --ion-modal-offset-top property on the host element. - * Called on present and on resize (e.g., device rotation changes safe-area). + * Sets the internal --ion-modal-offset-top property on the host element, + * resolving the current root --ion-safe-area-top when no value is given. + * Called on present, on resize (e.g., device rotation changes safe-area), + * and whenever the root safe-area value itself changes. */ - private updateSheetOffsetTop(): void { - const safeAreaTop = getRootSafeAreaTop(); - this.el.style.setProperty('--ion-modal-offset-top', `${safeAreaTop}px`); + private updateSheetOffsetTop(safeAreaTop?: number): void { + const value = safeAreaTop ?? getRootSafeAreaTop(); + this.el.style.setProperty('--ion-modal-offset-top', `${value}px`); } /** @@ -1593,6 +1599,9 @@ export class Modal implements ComponentInterface, OverlayInterface { private cleanupSafeAreaOverrides(): void { clearSafeAreaOverrides(this.el); + this.unsubscribeRootSafeAreaTop?.(); + this.unsubscribeRootSafeAreaTop = undefined; + // Remove internal sheet offset property this.el.style.removeProperty('--ion-modal-offset-top'); diff --git a/core/src/components/modal/safe-area-utils.ts b/core/src/components/modal/safe-area-utils.ts index 59ae3a4fdb5..b06b2315b63 100644 --- a/core/src/components/modal/safe-area-utils.ts +++ b/core/src/components/modal/safe-area-utils.ts @@ -104,6 +104,45 @@ export const getRootSafeAreaTop = (): number => { return value; }; +/** + * Calls back when the resolved root `--ion-safe-area-top` changes, which no + * event and no window resize covers. The probe's height tracks the variable, so + * a change to it becomes a size change the observer can see. + */ +export const onRootSafeAreaTopChange = (callback: (safeAreaTop: number) => void): (() => void) => { + const doc = win?.document; + if (!doc?.body || typeof ResizeObserver === 'undefined') { + return () => undefined; + } + + const probe = doc.createElement('div'); + probe.style.cssText = + 'position:fixed;visibility:hidden;pointer-events:none;top:0;left:0;width:0;' + + 'height:var(--ion-safe-area-top,0px);'; + doc.body.appendChild(probe); + + /** + * Seeded with the value the caller has already applied, so a change that + * lands before the observer's first delivery still gets reported. Comparing + * against an unset value instead would consume that first delivery and treat + * the new inset as the baseline. + */ + let lastHeight = getRootSafeAreaTop(); + const observer = new ResizeObserver((entries) => { + const { height } = entries[0].contentRect; + if (height !== lastHeight) { + lastHeight = height; + callback(height); + } + }); + observer.observe(probe); + + return () => { + observer.disconnect(); + probe.remove(); + }; +}; + /** * True when the modal host declares BOTH a non-fullscreen `--width` AND a * non-fullscreen `--height` (i.e. a centered-dialog-like modal that doesn't diff --git a/core/src/components/modal/test/safe-area/modal.e2e.ts b/core/src/components/modal/test/safe-area/modal.e2e.ts index 8f13349fe95..e247b174956 100644 --- a/core/src/components/modal/test/safe-area/modal.e2e.ts +++ b/core/src/components/modal/test/safe-area/modal.e2e.ts @@ -257,6 +257,62 @@ configs({ modes: ['ios', 'md'], directions: ['ltr'] }).forEach(({ title, config expect(offsetTop).toBe(`${TEST_SAFE_AREA_TOP}px`); }); + test('sheet modal should update --ion-modal-offset-top when the safe area top changes after present', async ({ + page, + }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31337', + }); + + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + + await page.click('#sheet-modal'); + await ionModalDidPresent.next(); + + const modal = page.locator('ion-modal'); + const offsetTop = () => + modal.evaluate((el: HTMLIonModalElement) => el.style.getPropertyValue('--ion-modal-offset-top')); + + expect(await offsetTop()).toBe(`${TEST_SAFE_AREA_TOP}px`); + + await page.evaluate(() => document.documentElement.style.setProperty('--ion-safe-area-top', '24px')); + + await expect(async () => { + expect(await offsetTop()).toBe('24px'); + }).toPass({ timeout: 5000 }); + }); + + /** + * Covers a sheet presented before the inset is known, which is the Android + * edge-to-edge startup order rather than the 47px the test page declares. + */ + test('sheet modal should pick up the safe area top when it starts at zero', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/31337', + }); + + await page.evaluate(() => document.documentElement.style.setProperty('--ion-safe-area-top', '0px')); + + const ionModalDidPresent = await page.spyOnEvent('ionModalDidPresent'); + + await page.click('#sheet-modal'); + await ionModalDidPresent.next(); + + const modal = page.locator('ion-modal'); + const offsetTop = () => + modal.evaluate((el: HTMLIonModalElement) => el.style.getPropertyValue('--ion-modal-offset-top')); + + expect(await offsetTop()).toBe('0px'); + + await page.evaluate(() => document.documentElement.style.setProperty('--ion-safe-area-top', '24px')); + + await expect(async () => { + expect(await offsetTop()).toBe('24px'); + }).toPass({ timeout: 5000 }); + }); + test('fullscreen modal safe-area should update on resize from phone to tablet', async ({ page }, testInfo) => { testInfo.annotations.push({ type: 'issue', From a4b086ee2ddac7da28190939a220d11bd9ed692c Mon Sep 17 00:00:00 2001 From: ionitron Date: Wed, 12 Aug 2026 21:15:42 +0000 Subject: [PATCH 09/10] v8.8.18 --- CHANGELOG.md | 14 ++++++++++++++ core/CHANGELOG.md | 14 ++++++++++++++ core/package-lock.json | 6 +++--- core/package.json | 2 +- lerna.json | 2 +- packages/angular-server/CHANGELOG.md | 8 ++++++++ packages/angular-server/package-lock.json | 8 ++++---- packages/angular-server/package.json | 4 ++-- packages/angular/CHANGELOG.md | 8 ++++++++ packages/angular/package-lock.json | 8 ++++---- packages/angular/package.json | 4 ++-- packages/docs/CHANGELOG.md | 8 ++++++++ packages/docs/package-lock.json | 6 +++--- packages/docs/package.json | 2 +- packages/react-router/CHANGELOG.md | 8 ++++++++ packages/react-router/package-lock.json | 8 ++++---- packages/react-router/package.json | 4 ++-- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/package-lock.json | 8 ++++---- packages/react/package.json | 4 ++-- packages/vue-router/CHANGELOG.md | 8 ++++++++ packages/vue-router/package-lock.json | 8 ++++---- packages/vue-router/package.json | 4 ++-- packages/vue/CHANGELOG.md | 8 ++++++++ packages/vue/package-lock.json | 8 ++++---- packages/vue/package.json | 4 ++-- 26 files changed, 129 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd48dab52b3..fcd32072979 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + + +### Bug Fixes + +* **core:** resolve lazy component chunks under Vite 8 ([#31341](https://github.com/ionic-team/ionic-framework/issues/31341)) ([a73e183](https://github.com/ionic-team/ionic-framework/commit/a73e1831d389e6dc968f646c0322b3984c1d3224)), closes [#31333](https://github.com/ionic-team/ionic-framework/issues/31333) +* **core:** update offsets when safe-area insets arrive late ([#31343](https://github.com/ionic-team/ionic-framework/issues/31343)) ([bc4fce2](https://github.com/ionic-team/ionic-framework/commit/bc4fce218d6c3aaac69f11d416b9fc8c8dacdfa4)), closes [#31337](https://github.com/ionic-team/ionic-framework/issues/31337) +* **datetime:** tear down ready state when an overlay dismisses ([#31335](https://github.com/ionic-team/ionic-framework/issues/31335)) ([d59e341](https://github.com/ionic-team/ionic-framework/commit/d59e3415df06cb26a7dea688f6720ba228b775d5)), closes [#31155](https://github.com/ionic-team/ionic-framework/issues/31155) [#31143](https://github.com/ionic-team/ionic-framework/issues/31143) +* **modal:** allow pull-to-refresh with a custom scroll host ([#31339](https://github.com/ionic-team/ionic-framework/issues/31339)) ([d6202a8](https://github.com/ionic-team/ionic-framework/commit/d6202a8933ad77735fceca05cb4b0fe6b33bfb55)), closes [#31332](https://github.com/ionic-team/ionic-framework/issues/31332) + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 0a1cd3100a5..84ed9ee1068 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + + +### Bug Fixes + +* **core:** resolve lazy component chunks under Vite 8 ([#31341](https://github.com/ionic-team/ionic-framework/issues/31341)) ([a73e183](https://github.com/ionic-team/ionic-framework/commit/a73e1831d389e6dc968f646c0322b3984c1d3224)), closes [#31333](https://github.com/ionic-team/ionic-framework/issues/31333) +* **core:** update offsets when safe-area insets arrive late ([#31343](https://github.com/ionic-team/ionic-framework/issues/31343)) ([bc4fce2](https://github.com/ionic-team/ionic-framework/commit/bc4fce218d6c3aaac69f11d416b9fc8c8dacdfa4)), closes [#31337](https://github.com/ionic-team/ionic-framework/issues/31337) +* **datetime:** tear down ready state when an overlay dismisses ([#31335](https://github.com/ionic-team/ionic-framework/issues/31335)) ([d59e341](https://github.com/ionic-team/ionic-framework/commit/d59e3415df06cb26a7dea688f6720ba228b775d5)), closes [#31155](https://github.com/ionic-team/ionic-framework/issues/31155) [#31143](https://github.com/ionic-team/ionic-framework/issues/31143) +* **modal:** allow pull-to-refresh with a custom scroll host ([#31339](https://github.com/ionic-team/ionic-framework/issues/31339)) ([d6202a8](https://github.com/ionic-team/ionic-framework/commit/d6202a8933ad77735fceca05cb4b0fe6b33bfb55)), closes [#31332](https://github.com/ionic-team/ionic-framework/issues/31332) + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) diff --git a/core/package-lock.json b/core/package-lock.json index acb63de094c..9b90c718acc 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ionic/core", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/core", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT", "dependencies": { "@stencil/core": "4.43.5", @@ -9846,4 +9846,4 @@ } } } -} +} \ No newline at end of file diff --git a/core/package.json b/core/package.json index 59789c45b23..c3f01339760 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/core", - "version": "8.8.17", + "version": "8.8.18", "description": "Base components for Ionic", "engines": { "node": ">= 16" diff --git a/lerna.json b/lerna.json index 912a19d65ce..bb1850e0fa4 100644 --- a/lerna.json +++ b/lerna.json @@ -3,5 +3,5 @@ "core", "packages/*" ], - "version": "8.8.17" + "version": "8.8.18" } \ No newline at end of file diff --git a/packages/angular-server/CHANGELOG.md b/packages/angular-server/CHANGELOG.md index 1d575bf7c87..e21d866a157 100644 --- a/packages/angular-server/CHANGELOG.md +++ b/packages/angular-server/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + +**Note:** Version bump only for package @ionic/angular-server + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) **Note:** Version bump only for package @ionic/angular-server diff --git a/packages/angular-server/package-lock.json b/packages/angular-server/package-lock.json index 86ca790b08f..f1f2d4b0a96 100644 --- a/packages/angular-server/package-lock.json +++ b/packages/angular-server/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/angular-server", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/angular-server", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT", "dependencies": { - "@ionic/core": "^8.8.17" + "@ionic/core": "^8.8.18" }, "devDependencies": { "@angular-eslint/eslint-plugin": "^16.0.0", @@ -11289,4 +11289,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/angular-server/package.json b/packages/angular-server/package.json index bb511316663..8d92a971fc2 100644 --- a/packages/angular-server/package.json +++ b/packages/angular-server/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/angular-server", - "version": "8.8.17", + "version": "8.8.18", "description": "Angular SSR Module for Ionic", "keywords": [ "ionic", @@ -62,6 +62,6 @@ }, "prettier": "@ionic/prettier-config", "dependencies": { - "@ionic/core": "^8.8.17" + "@ionic/core": "^8.8.18" } } diff --git a/packages/angular/CHANGELOG.md b/packages/angular/CHANGELOG.md index 15b4bd57110..eba40d13271 100644 --- a/packages/angular/CHANGELOG.md +++ b/packages/angular/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + +**Note:** Version bump only for package @ionic/angular + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) diff --git a/packages/angular/package-lock.json b/packages/angular/package-lock.json index 360b526d0e5..867ea375b41 100644 --- a/packages/angular/package-lock.json +++ b/packages/angular/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/angular", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/angular", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT", "dependencies": { - "@ionic/core": "^8.8.17", + "@ionic/core": "^8.8.18", "ionicons": "^8.0.13", "jsonc-parser": "^3.0.0", "tslib": "^2.3.0" @@ -9095,4 +9095,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/angular/package.json b/packages/angular/package.json index 34b453d3b94..a250c9d9c96 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/angular", - "version": "8.8.17", + "version": "8.8.18", "description": "Angular specific wrappers for @ionic/core", "keywords": [ "ionic", @@ -48,7 +48,7 @@ } }, "dependencies": { - "@ionic/core": "^8.8.17", + "@ionic/core": "^8.8.18", "ionicons": "^8.0.13", "jsonc-parser": "^3.0.0", "tslib": "^2.3.0" diff --git a/packages/docs/CHANGELOG.md b/packages/docs/CHANGELOG.md index a1883d14b8f..36c4332ec5e 100644 --- a/packages/docs/CHANGELOG.md +++ b/packages/docs/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + +**Note:** Version bump only for package @ionic/docs + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) **Note:** Version bump only for package @ionic/docs diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.json index 994c44fc16e..0b735b6c0e6 100644 --- a/packages/docs/package-lock.json +++ b/packages/docs/package-lock.json @@ -1,13 +1,13 @@ { "name": "@ionic/docs", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/docs", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT" } } -} +} \ No newline at end of file diff --git a/packages/docs/package.json b/packages/docs/package.json index a2721216842..bfa8999c5af 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/docs", - "version": "8.8.17", + "version": "8.8.18", "description": "Pre-packaged API documentation for the Ionic docs.", "main": "core.json", "types": "core.d.ts", diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 6f655df1f4e..01f78e17712 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + +**Note:** Version bump only for package @ionic/react-router + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) diff --git a/packages/react-router/package-lock.json b/packages/react-router/package-lock.json index 27276afbc0b..117c4f7ec8a 100644 --- a/packages/react-router/package-lock.json +++ b/packages/react-router/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/react-router", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/react-router", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT", "dependencies": { - "@ionic/react": "^8.8.17", + "@ionic/react": "^8.8.18", "tslib": "*" }, "devDependencies": { @@ -6847,4 +6847,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 97567490341..b0e045dd890 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react-router", - "version": "8.8.17", + "version": "8.8.18", "description": "React Router wrapper for @ionic/react", "keywords": [ "ionic", @@ -36,7 +36,7 @@ "dist/" ], "dependencies": { - "@ionic/react": "^8.8.17", + "@ionic/react": "^8.8.18", "tslib": "*" }, "peerDependencies": { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 74bf41814ce..7daf28a6f78 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + +**Note:** Version bump only for package @ionic/react + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) **Note:** Version bump only for package @ionic/react diff --git a/packages/react/package-lock.json b/packages/react/package-lock.json index d7033c49157..2c36bb72f25 100644 --- a/packages/react/package-lock.json +++ b/packages/react/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/react", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/react", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT", "dependencies": { - "@ionic/core": "^8.8.17", + "@ionic/core": "^8.8.18", "ionicons": "^8.0.13", "tslib": "*" }, @@ -11916,4 +11916,4 @@ } } } -} +} \ No newline at end of file diff --git a/packages/react/package.json b/packages/react/package.json index e62dc63813a..e37684fc0fc 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react", - "version": "8.8.17", + "version": "8.8.18", "description": "React specific wrapper for @ionic/core", "keywords": [ "ionic", @@ -40,7 +40,7 @@ "css/" ], "dependencies": { - "@ionic/core": "^8.8.17", + "@ionic/core": "^8.8.18", "ionicons": "^8.0.13", "tslib": "*" }, diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md index 6c9e5d49242..fe3d03966f9 100644 --- a/packages/vue-router/CHANGELOG.md +++ b/packages/vue-router/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + +**Note:** Version bump only for package @ionic/vue-router + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) **Note:** Version bump only for package @ionic/vue-router diff --git a/packages/vue-router/package-lock.json b/packages/vue-router/package-lock.json index c4a7d810a0b..3a39c8ccc15 100644 --- a/packages/vue-router/package-lock.json +++ b/packages/vue-router/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/vue-router", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/vue-router", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT", "dependencies": { - "@ionic/vue": "^8.8.17" + "@ionic/vue": "^8.8.18" }, "devDependencies": { "@ionic/eslint-config": "^0.3.0", @@ -12994,4 +12994,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index c1c45dbf5c7..f5cdc21173e 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/vue-router", - "version": "8.8.17", + "version": "8.8.18", "description": "Vue Router integration for @ionic/vue", "scripts": { "test.spec": "jest", @@ -44,7 +44,7 @@ }, "homepage": "https://github.com/ionic-team/ionic-framework#readme", "dependencies": { - "@ionic/vue": "^8.8.17" + "@ionic/vue": "^8.8.18" }, "devDependencies": { "@ionic/eslint-config": "^0.3.0", diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index c7c1207ed58..3a17d3483f4 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [8.8.18](https://github.com/ionic-team/ionic-framework/compare/v8.8.17...v8.8.18) (2026-08-12) + +**Note:** Version bump only for package @ionic/vue + + + + + ## [8.8.17](https://github.com/ionic-team/ionic-framework/compare/v8.8.16...v8.8.17) (2026-08-05) diff --git a/packages/vue/package-lock.json b/packages/vue/package-lock.json index a764cf75285..55cafb95075 100644 --- a/packages/vue/package-lock.json +++ b/packages/vue/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/vue", - "version": "8.8.17", + "version": "8.8.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/vue", - "version": "8.8.17", + "version": "8.8.18", "license": "MIT", "dependencies": { - "@ionic/core": "^8.8.17", + "@ionic/core": "^8.8.18", "@stencil/vue-output-target": "0.10.7", "ionicons": "^8.0.13" }, @@ -4022,4 +4022,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/packages/vue/package.json b/packages/vue/package.json index e3695b4168c..fb746f7272f 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/vue", - "version": "8.8.17", + "version": "8.8.18", "description": "Vue specific wrapper for @ionic/core", "scripts": { "eslint": "eslint src", @@ -68,7 +68,7 @@ "vue-router": "^4.0.16" }, "dependencies": { - "@ionic/core": "^8.8.17", + "@ionic/core": "^8.8.18", "@stencil/vue-output-target": "0.10.7", "ionicons": "^8.0.13" }, From 15e47cd72d478637bfea54948fd4c5ab8eea21d6 Mon Sep 17 00:00:00 2001 From: ionitron Date: Wed, 12 Aug 2026 21:16:39 +0000 Subject: [PATCH 10/10] chore(): update package lock files --- core/package-lock.json | 2 +- packages/angular-server/package-lock.json | 14 +++++------ packages/angular/package-lock.json | 8 +++--- packages/docs/package-lock.json | 2 +- packages/react-router/package-lock.json | 30 +++++++++++------------ packages/react/package-lock.json | 8 +++--- packages/vue-router/package-lock.json | 30 +++++++++++------------ packages/vue/package-lock.json | 8 +++--- 8 files changed, 51 insertions(+), 51 deletions(-) diff --git a/core/package-lock.json b/core/package-lock.json index 9b90c718acc..3e47702a493 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -9846,4 +9846,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/angular-server/package-lock.json b/packages/angular-server/package-lock.json index f1f2d4b0a96..06eeb9f9f6f 100644 --- a/packages/angular-server/package-lock.json +++ b/packages/angular-server/package-lock.json @@ -1031,9 +1031,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "license": "MIT", "dependencies": { "@stencil/core": "4.43.5", @@ -7309,9 +7309,9 @@ "dev": true }, "@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "requires": { "@stencil/core": "4.43.5", "ionicons": "^8.0.13", @@ -11289,4 +11289,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/angular/package-lock.json b/packages/angular/package-lock.json index 867ea375b41..8614d76bdaf 100644 --- a/packages/angular/package-lock.json +++ b/packages/angular/package-lock.json @@ -1398,9 +1398,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "license": "MIT", "dependencies": { "@stencil/core": "4.43.5", @@ -9095,4 +9095,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.json index 0b735b6c0e6..195bd3a51b8 100644 --- a/packages/docs/package-lock.json +++ b/packages/docs/package-lock.json @@ -10,4 +10,4 @@ "license": "MIT" } } -} \ No newline at end of file +} diff --git a/packages/react-router/package-lock.json b/packages/react-router/package-lock.json index 117c4f7ec8a..71842eeb710 100644 --- a/packages/react-router/package-lock.json +++ b/packages/react-router/package-lock.json @@ -238,9 +238,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "license": "MIT", "dependencies": { "@stencil/core": "4.43.5", @@ -418,12 +418,12 @@ } }, "node_modules/@ionic/react": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.8.17.tgz", - "integrity": "sha512-k3ufmaxJUQPbifEdoYZFz9vxHy/rlU+K+pXVpo6wgyYMEeF2GHsASjViqLDVh3KVHXZKu6RYk7OpdETFc5Ltlw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.8.18.tgz", + "integrity": "sha512-Hp7PuvuzqREzyWTDFYykgDLDE4RqE932+YX/gr0O3N/EfrPBAeuDeVZqPh2NLGQvliDcU1mwItGxWy/H0PK+Qg==", "license": "MIT", "dependencies": { - "@ionic/core": "8.8.17", + "@ionic/core": "8.8.18", "ionicons": "^8.0.13", "tslib": "*" }, @@ -4178,9 +4178,9 @@ "dev": true }, "@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "requires": { "@stencil/core": "4.43.5", "ionicons": "^8.0.13", @@ -4284,11 +4284,11 @@ "requires": {} }, "@ionic/react": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.8.17.tgz", - "integrity": "sha512-k3ufmaxJUQPbifEdoYZFz9vxHy/rlU+K+pXVpo6wgyYMEeF2GHsASjViqLDVh3KVHXZKu6RYk7OpdETFc5Ltlw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.8.18.tgz", + "integrity": "sha512-Hp7PuvuzqREzyWTDFYykgDLDE4RqE932+YX/gr0O3N/EfrPBAeuDeVZqPh2NLGQvliDcU1mwItGxWy/H0PK+Qg==", "requires": { - "@ionic/core": "8.8.17", + "@ionic/core": "8.8.18", "ionicons": "^8.0.13", "tslib": "*" } @@ -6847,4 +6847,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/packages/react/package-lock.json b/packages/react/package-lock.json index 2c36bb72f25..00b186644ea 100644 --- a/packages/react/package-lock.json +++ b/packages/react/package-lock.json @@ -736,9 +736,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "license": "MIT", "dependencies": { "@stencil/core": "4.43.5", @@ -11916,4 +11916,4 @@ } } } -} \ No newline at end of file +} diff --git a/packages/vue-router/package-lock.json b/packages/vue-router/package-lock.json index 3a39c8ccc15..b893052b3ec 100644 --- a/packages/vue-router/package-lock.json +++ b/packages/vue-router/package-lock.json @@ -673,9 +673,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "license": "MIT", "dependencies": { "@stencil/core": "4.43.5", @@ -868,12 +868,12 @@ } }, "node_modules/@ionic/vue": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.8.17.tgz", - "integrity": "sha512-aD7rgodl9lw0cziNxEE/dpnms9+lNlvTB6d54vGmuaqZdgqe6zqnWVMigmR6Acf8kUEDdYh+w0/XnP5BKfJsoQ==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.8.18.tgz", + "integrity": "sha512-4Cqp9L+nubSK5PnG8eKENfdnjFL/ze0Et7W87rQYTQzAVxiNqK9vmdVzWK8BErP1uSV+lbXsiQ8SrzQl6mlNiQ==", "license": "MIT", "dependencies": { - "@ionic/core": "8.8.17", + "@ionic/core": "8.8.18", "@stencil/vue-output-target": "0.10.7", "ionicons": "^8.0.13" } @@ -8044,9 +8044,9 @@ "dev": true }, "@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "requires": { "@stencil/core": "4.43.5", "ionicons": "^8.0.13", @@ -8159,11 +8159,11 @@ "requires": {} }, "@ionic/vue": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.8.17.tgz", - "integrity": "sha512-aD7rgodl9lw0cziNxEE/dpnms9+lNlvTB6d54vGmuaqZdgqe6zqnWVMigmR6Acf8kUEDdYh+w0/XnP5BKfJsoQ==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.8.18.tgz", + "integrity": "sha512-4Cqp9L+nubSK5PnG8eKENfdnjFL/ze0Et7W87rQYTQzAVxiNqK9vmdVzWK8BErP1uSV+lbXsiQ8SrzQl6mlNiQ==", "requires": { - "@ionic/core": "8.8.17", + "@ionic/core": "8.8.18", "@stencil/vue-output-target": "0.10.7", "ionicons": "^8.0.13" } @@ -12994,4 +12994,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/packages/vue/package-lock.json b/packages/vue/package-lock.json index 55cafb95075..15adcb4e558 100644 --- a/packages/vue/package-lock.json +++ b/packages/vue/package-lock.json @@ -222,9 +222,9 @@ "dev": true }, "node_modules/@ionic/core": { - "version": "8.8.17", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.17.tgz", - "integrity": "sha512-w4Ya+0EpGqajVbp6c6TMt4u/MX1flmdzpz2gfgXUkRgp/YfFIRw8n6pIZEOv4EzdUzrhhvPVUEZR64w9R5Fguw==", + "version": "8.8.18", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.8.18.tgz", + "integrity": "sha512-QRFqi6gMSTk89FMjtoDx3p6e2dD7mYxqYzS0+Hl+yjxnoWoNFluWKM9rnGEEkdvpY7bF1pt6CI5IwMt+vjYQWg==", "license": "MIT", "dependencies": { "@stencil/core": "4.43.5", @@ -4022,4 +4022,4 @@ "dev": true } } -} \ No newline at end of file +}