diff --git a/.github/ionic-issue-bot.yml b/.github/ionic-issue-bot.yml index e8fe071bbfb..c3179956be1 100644 --- a/.github/ionic-issue-bot.yml +++ b/.github/ionic-issue-bot.yml @@ -42,7 +42,7 @@ comment: If the requested feature is something you would find useful for your applications, please react to the original post with 👍 (`+1`). If you would like to provide an additional use case for the feature, please post a comment. - The team will review this feedback and make a final decision. Any decision will be posted on this thread, but please note that we may ultimately decide not to pursue this feature. + Feedback is open for 90 days. After that, the team will review the feedback and make a final decision. Any decision will be posted on this thread, but please note that we may ultimately decide not to pursue this feature. Thank you! @@ -103,6 +103,14 @@ stale: lock: true dryRun: false +labelTimeout: + labels: + - label: "community feedback wanted" + days: 90 + replaceWith: triage + maxIssuesPerRun: 100 + dryRun: false + noReply: days: 14 maxIssuesPerRun: 100 @@ -121,11 +129,15 @@ noReply: lock: true dryRun: false -noReproduction: +needsReproduction: days: 14 maxIssuesPerRun: 100 label: "ionitron: needs reproduction" responseLabel: triage + # a link to a repo outside ionic-team, like StackBlitz or CodeSandbox + # an attached file (not an image or video), + # or an Ionic component tag ( or ) + responsePattern: 'https?://(github\.com/(?!ionic-team/|user-attachments/assets/)[^/\s]+/[^/\s]+|gitlab\.com/|bitbucket\.org/|stackblitz\.com/|codesandbox\.io/)| diff --git a/CHANGELOG.md b/CHANGELOG.md index 291c453bb43..ade4d394b5f 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. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +### Bug Fixes + +* **angular:** go back in browser history when popping to the previous view ([#31752](https://github.com/ionic-team/ionic-framework/issues/31752)) ([fd0ac5e](https://github.com/ionic-team/ionic-framework/commit/fd0ac5e9f340766e19f093852e596d67cd9b567a)), closes [#23448](https://github.com/ionic-team/ionic-framework/issues/23448) [#17752](https://github.com/ionic-team/ionic-framework/issues/17752) [#28307](https://github.com/ionic-team/ionic-framework/issues/28307) +* **breadcrumb, item-option:** pass rel to the link ([#31726](https://github.com/ionic-team/ionic-framework/issues/31726)) ([f07b030](https://github.com/ionic-team/ionic-framework/commit/f07b030521d76fea9a7099e42170ddcd62e11c61)), closes [#31725](https://github.com/ionic-team/ionic-framework/issues/31725) +* **datetime:** do not change max when the selected day does not exist in the new month ([#31489](https://github.com/ionic-team/ionic-framework/issues/31489)) ([17326e1](https://github.com/ionic-team/ionic-framework/commit/17326e1edce57938e416834a0dda96ca74890acb)), closes [#29124](https://github.com/ionic-team/ionic-framework/issues/29124) [#29124](https://github.com/ionic-team/ionic-framework/issues/29124) +* **datetime:** show all month values between the min and max years ([#31490](https://github.com/ionic-team/ionic-framework/issues/31490)) ([97420a3](https://github.com/ionic-team/ionic-framework/commit/97420a3692ee49839a5ac0302327304b564f0435)) +* **deps:** update @stencil/core to v4.45.5 for ssr escaping ([#31791](https://github.com/ionic-team/ionic-framework/issues/31791)) ([6e16101](https://github.com/ionic-team/ionic-framework/commit/6e1610174f86cf3fa82bae9ae8781c24b98b3fed)), closes [#31792](https://github.com/ionic-team/ionic-framework/issues/31792) +* **deps:** update ionicons to v8.1.1 for svg sanitization fix ([#31790](https://github.com/ionic-team/ionic-framework/issues/31790)) ([2040b22](https://github.com/ionic-team/ionic-framework/commit/2040b22afd8a8236ebe6444ef52db88ffcff2118)), closes [#31789](https://github.com/ionic-team/ionic-framework/issues/31789) +* **footer:** fade the toolbar background out fully at the bottom ([#31771](https://github.com/ionic-team/ionic-framework/issues/31771)) ([ca4f2e6](https://github.com/ionic-team/ionic-framework/commit/ca4f2e67f9d388469e5e1f13787def6dbe65fa63)), closes [#31768](https://github.com/ionic-team/ionic-framework/issues/31768) +* **rtl:** use :dir() for rtl styles when the browser supports it ([#31744](https://github.com/ionic-team/ionic-framework/issues/31744)) ([7ecca28](https://github.com/ionic-team/ionic-framework/commit/7ecca28c17913ac5bf062e8937954516f005c0eb)) + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) ### Bug Fixes diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 774a2cc024c..e0e7bff6ae1 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +### Bug Fixes + +* **breadcrumb, item-option:** pass rel to the link ([#31726](https://github.com/ionic-team/ionic-framework/issues/31726)) ([f07b030](https://github.com/ionic-team/ionic-framework/commit/f07b030521d76fea9a7099e42170ddcd62e11c61)), closes [#31725](https://github.com/ionic-team/ionic-framework/issues/31725) +* **datetime:** do not change max when the selected day does not exist in the new month ([#31489](https://github.com/ionic-team/ionic-framework/issues/31489)) ([17326e1](https://github.com/ionic-team/ionic-framework/commit/17326e1edce57938e416834a0dda96ca74890acb)), closes [#29124](https://github.com/ionic-team/ionic-framework/issues/29124) [#29124](https://github.com/ionic-team/ionic-framework/issues/29124) +* **datetime:** show all month values between the min and max years ([#31490](https://github.com/ionic-team/ionic-framework/issues/31490)) ([97420a3](https://github.com/ionic-team/ionic-framework/commit/97420a3692ee49839a5ac0302327304b564f0435)) +* **deps:** update @stencil/core to v4.45.5 for ssr escaping ([#31791](https://github.com/ionic-team/ionic-framework/issues/31791)) ([6e16101](https://github.com/ionic-team/ionic-framework/commit/6e1610174f86cf3fa82bae9ae8781c24b98b3fed)), closes [#31792](https://github.com/ionic-team/ionic-framework/issues/31792) +* **deps:** update ionicons to v8.1.1 for svg sanitization fix ([#31790](https://github.com/ionic-team/ionic-framework/issues/31790)) ([2040b22](https://github.com/ionic-team/ionic-framework/commit/2040b22afd8a8236ebe6444ef52db88ffcff2118)), closes [#31789](https://github.com/ionic-team/ionic-framework/issues/31789) +* **footer:** fade the toolbar background out fully at the bottom ([#31771](https://github.com/ionic-team/ionic-framework/issues/31771)) ([ca4f2e6](https://github.com/ionic-team/ionic-framework/commit/ca4f2e67f9d388469e5e1f13787def6dbe65fa63)), closes [#31768](https://github.com/ionic-team/ionic-framework/issues/31768) +* **rtl:** use :dir() for rtl styles when the browser supports it ([#31744](https://github.com/ionic-team/ionic-framework/issues/31744)) ([7ecca28](https://github.com/ionic-team/ionic-framework/commit/7ecca28c17913ac5bf062e8937954516f005c0eb)) + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) ### Bug Fixes diff --git a/core/package-lock.json b/core/package-lock.json index d64c919f9f0..5b90052c526 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -1,16 +1,16 @@ { "name": "@ionic/core", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/core", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT", "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "devDependencies": { @@ -1772,9 +1772,9 @@ } }, "node_modules/@stencil/core": { - "version": "4.45.4", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.4.tgz", - "integrity": "sha512-MkGop5DULDFAorpI4/zeEqmU9KRuUaqrjprMrEdpqGXhWQ8Lkk4jqQF+lJtOa3BjPrv8j7Ux2hu6vpd4vJJUvw==", + "version": "4.45.5", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.5.tgz", + "integrity": "sha512-tz6h9MI/s0WwNsfGbSguo9+xnerWam8NI8/U3VUS9MNMviTYyg3Ymz5XniSM9PGFnbd2xhhmyJhHHaFmy9mYog==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -6079,9 +6079,9 @@ } }, "node_modules/ionicons": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.0.tgz", - "integrity": "sha512-XSM2gYWTXxSYTwjmKWAoy4yR7AbAFDjpc5ZIivAiGXskM0fe5CdMPfs6InQRUcrYtVb2WZ/0HQ1/jeh3JW78SA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.1.tgz", + "integrity": "sha512-VJjbZjjyzFmI0MAtlUKRprLpD4MbGbwcijk2aduu/a3jhGhlSUC/tQ2wM3p0/SF44/oDFdl0bdZMya3rZxnoyg==", "license": "MIT", "dependencies": { "@stencil/core": "^4.43.5" diff --git a/core/package.json b/core/package.json index fb78bd9e640..6cc72ba0d18 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/core", - "version": "9.0.12", + "version": "9.0.13", "description": "Base components for Ionic", "engines": { "node": ">= 16" @@ -66,8 +66,8 @@ "loader/" ], "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "devDependencies": { diff --git a/core/src/components/breadcrumb/breadcrumb.tsx b/core/src/components/breadcrumb/breadcrumb.tsx index b2bde3c09eb..a30f0645920 100644 --- a/core/src/components/breadcrumb/breadcrumb.tsx +++ b/core/src/components/breadcrumb/breadcrumb.tsx @@ -183,6 +183,7 @@ export class Breadcrumb implements ComponentInterface { el, inheritedAttributes, last, + rel, routerAnimation, routerDirection, separator, @@ -203,6 +204,7 @@ export class Breadcrumb implements ComponentInterface { : { download, href, + rel, target, }; diff --git a/core/src/components/breadcrumb/test/breadcrumb.spec.ts b/core/src/components/breadcrumb/test/breadcrumb.spec.ts new file mode 100644 index 00000000000..929aa35c871 --- /dev/null +++ b/core/src/components/breadcrumb/test/breadcrumb.spec.ts @@ -0,0 +1,16 @@ +import { newSpecPage } from '@stencil/core/testing'; + +import { Breadcrumb } from '../breadcrumb'; + +describe('breadcrumb: rel', () => { + it('should set the rel attribute on the link', async () => { + const page = await newSpecPage({ + components: [Breadcrumb], + html: `Ionic`, + }); + + const link = page.body.querySelector('ion-breadcrumb')!.shadowRoot!.querySelector('a')!; + + expect(link.getAttribute('rel')).toBe('noopener noreferrer'); + }); +}); diff --git a/core/src/components/datetime/test/data.spec.ts b/core/src/components/datetime/test/data.spec.ts index 506a2ab03fe..018722fffff 100644 --- a/core/src/components/datetime/test/data.spec.ts +++ b/core/src/components/datetime/test/data.spec.ts @@ -6,6 +6,7 @@ import { getToday, getCombinedDateColumnData, getTimeColumnsData, + getMonthColumnData, } from '../utils/data'; // The minutes are the same across all hour cycles, so we don't check those @@ -516,3 +517,33 @@ describe('getCombinedDateColumnData', () => { ]); }); }); + +describe('getMonthColumnData()', () => { + const monthValues = [1, 3, 5, 7, 9, 11]; + const getValues = (refParts: DatetimeParts, minParts?: DatetimeParts, maxParts?: DatetimeParts) => + getMonthColumnData('en-US', refParts, minParts, maxParts, monthValues).map((option) => option.value); + + it('should apply the min month only in the min year when monthValues is set', () => { + const minParts = { month: 6, day: 1, year: 2020 }; + + expect(getValues({ month: 5, day: 1, year: 2020 }, minParts)).toEqual([7, 9, 11]); + expect(getValues({ month: 3, day: 1, year: 2024 }, minParts)).toEqual([1, 3, 5, 7, 9, 11]); + }); + + it('should apply the max month only in the max year when monthValues is set', () => { + const maxParts = { month: 4, day: 30, year: 2025 }; + + expect(getValues({ month: 3, day: 1, year: 2025 }, undefined, maxParts)).toEqual([1, 3]); + expect(getValues({ month: 9, day: 1, year: 2024 }, undefined, maxParts)).toEqual([1, 3, 5, 7, 9, 11]); + }); + + it('should match the months shown when monthValues is not set', () => { + const minParts = { month: 6, day: 1, year: 2020 }; + const maxParts = { month: 4, day: 30, year: 2025 }; + const refParts = { month: 3, day: 1, year: 2024 }; + + const allMonths = getMonthColumnData('en-US', refParts, minParts, maxParts).map((option) => option.value); + expect(allMonths).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]); + expect(getValues(refParts, minParts, maxParts)).toEqual([1, 3, 5, 7, 9, 11]); + }); +}); diff --git a/core/src/components/datetime/test/manipulation.spec.ts b/core/src/components/datetime/test/manipulation.spec.ts index daebf7c33ea..d03cec325ba 100644 --- a/core/src/components/datetime/test/manipulation.spec.ts +++ b/core/src/components/datetime/test/manipulation.spec.ts @@ -558,6 +558,38 @@ describe('validateParts()', () => { }) ).toEqual({ month: 1, day: 1, year: 2022, hour: 9, minute: 30 }); }); + it('should not mutate the max parts when the day does not exist in the new month', () => { + // Selecting March 31 and then April on the month wheel produces April 31. + const maxParts = { month: 4, day: 20, year: 2024, hour: 23, minute: 59 }; + + expect(validateParts({ month: 4, day: 31, year: 2024, hour: 23, minute: 59 }, undefined, maxParts)).toEqual({ + month: 4, + day: 20, + year: 2024, + hour: 23, + minute: 59, + }); + expect(maxParts).toEqual({ month: 4, day: 20, year: 2024, hour: 23, minute: 59 }); + }); + it('should not mutate the min parts when the day does not exist in the new month', () => { + const minParts = { month: 3, day: 1, year: 2024, hour: 0, minute: 0 }; + + const result = validateParts({ month: 2, day: 31, year: 2024, hour: 0, minute: 0 }, minParts); + expect(result).toEqual({ month: 3, day: 1, year: 2024, hour: 0, minute: 0 }); + expect(minParts).toEqual({ month: 3, day: 1, year: 2024, hour: 0, minute: 0 }); + }); + it('should move the time back in bounds when the fixed day lands on the max day', () => { + // February 31 becomes February 29, which is the max day, so the max time applies. + expect( + validateParts({ month: 2, day: 31, year: 2024, hour: 23, minute: 0 }, undefined, { + month: 2, + day: 29, + year: 2024, + hour: 20, + minute: 0, + }) + ).toEqual({ month: 2, day: 29, year: 2024, hour: 20, minute: 0 }); + }); }); describe('getClosestValidDate()', () => { diff --git a/core/src/components/datetime/utils/data.ts b/core/src/components/datetime/utils/data.ts index bd6f328752e..a8db2ae0cf4 100644 --- a/core/src/components/datetime/utils/data.ts +++ b/core/src/components/datetime/utils/data.ts @@ -359,10 +359,15 @@ export const getMonthColumnData = ( if (monthValues !== undefined) { let processedMonths = monthValues; - if (maxParts?.month !== undefined) { + /** + * The max and min months only apply to the + * max and min years. For example, with a max of + * 2025-03, every month of 2024 is still allowed. + */ + if (maxParts?.month !== undefined && maxParts.year === year) { processedMonths = processedMonths.filter((month) => month <= maxParts.month!); } - if (minParts?.month !== undefined) { + if (minParts?.month !== undefined && minParts.year === year) { processedMonths = processedMonths.filter((month) => month >= minParts.month!); } diff --git a/core/src/components/datetime/utils/manipulation.ts b/core/src/components/datetime/utils/manipulation.ts index 152f2f62fec..6c954efd251 100644 --- a/core/src/components/datetime/utils/manipulation.ts +++ b/core/src/components/datetime/utils/manipulation.ts @@ -342,7 +342,7 @@ export const validateParts = ( maxParts?: DatetimeParts ): DatetimeParts => { const { month, day, year } = parts; - const partsCopy = clampDate({ ...parts }, minParts, maxParts); + const dayInMonth = { ...parts }; const numDays = getNumDaysInMonth(month, year); @@ -351,11 +351,21 @@ export const validateParts = ( * is greater than the day we want * to set, update the DatetimeParts * day field to be the max days. + * This is done before clamping so that + * the fixed day is also checked against + * the min/max bounds. */ if (day !== null && numDays < day) { - partsCopy.day = numDays; + dayInMonth.day = numDays; } + /** + * clampDate can return the minParts or maxParts + * object itself, so copy the result to avoid + * changing the bounds when updating the time below. + */ + const partsCopy = { ...clampDate(dayInMonth, minParts, maxParts) }; + /** * If value is same day as min day, * make sure the time value is in bounds. @@ -391,7 +401,7 @@ export const validateParts = ( * If value is same day as max day, * make sure the time value is in bounds. */ - if (maxParts !== undefined && isSameDay(parts, maxParts)) { + if (maxParts !== undefined && isSameDay(partsCopy, maxParts)) { /** * If the hour is out of bounds, * update both the hour and minute. diff --git a/core/src/components/footer/footer.utils.ts b/core/src/components/footer/footer.utils.ts index a269ffb0723..31f185bb038 100644 --- a/core/src/components/footer/footer.utils.ts +++ b/core/src/components/footer/footer.utils.ts @@ -3,7 +3,13 @@ import { clamp } from '@utils/helpers'; export const handleFooterFade = (scrollEl: HTMLElement, baseEl: HTMLElement) => { readTask(() => { - const scrollTop = scrollEl.scrollTop; + /** + * scrollTop can be fractional while scrollHeight and + * clientHeight are whole pixels. Rounding up lets a + * scroll at the very bottom reach maxScroll, so the + * toolbar background fades out completely. + */ + const scrollTop = Math.ceil(scrollEl.scrollTop); const maxScroll = scrollEl.scrollHeight - scrollEl.clientHeight; /** diff --git a/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts b/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts index 31a822ee0f7..db490e16d48 100644 --- a/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts +++ b/core/src/components/infinite-scroll/test/top/infinite-scroll.e2e.ts @@ -3,10 +3,7 @@ import { configs, test } from '@utils/test/playwright'; configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { test.describe(title('infinite-scroll: top'), () => { - test('should load more items when scrolled to the top', async ({ page, skip }) => { - // TODO(FW-6394): remove once flaky issue is resolved - skip.browser('webkit', 'Safari is flaky on CI'); - + test('should load more items when scrolled to the top', async ({ page }) => { await page.goto('/src/components/infinite-scroll/test/top', config); const ionInfiniteComplete = await page.spyOnEvent('ionInfiniteComplete'); @@ -14,6 +11,22 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => { const items = page.locator('ion-item'); expect(await items.count()).toBe(30); + /** + * Wait for infinite scroll to move the content to the bottom + * on load. The scroll must start outside the trigger zone + * (infinite scroll height + 100px threshold), otherwise the + * load fires from that initial scroll instead of from + * scrolling to the top. + */ + await expect + .poll(() => + content.evaluate(async (el: HTMLIonContentElement) => { + const scrollEl = await el.getScrollElement(); + return scrollEl.scrollTop; + }) + ) + .toBeGreaterThan(200); + await content.evaluate((el: HTMLIonContentElement) => el.scrollToTop(0)); await ionInfiniteComplete.next(); diff --git a/core/src/components/item-option/item-option.tsx b/core/src/components/item-option/item-option.tsx index 1cdbdf4d089..932705a5f02 100644 --- a/core/src/components/item-option/item-option.tsx +++ b/core/src/components/item-option/item-option.tsx @@ -114,6 +114,7 @@ export class ItemOption implements ComponentInterface, AnchorInterface, ButtonIn : { download: this.download, href: this.href, + rel: this.rel, target: this.target, }; diff --git a/core/src/components/item-option/test/item-option.spec.ts b/core/src/components/item-option/test/item-option.spec.ts index 7e6390b28da..88c5295a6c1 100644 --- a/core/src/components/item-option/test/item-option.spec.ts +++ b/core/src/components/item-option/test/item-option.spec.ts @@ -29,3 +29,16 @@ describe('item option: tabindex', () => { expect(nativeEl.getAttribute('tabindex')).toBe('0'); }); }); + +describe('item option: rel', () => { + it('should set the rel attribute on the link', async () => { + const page = await newSpecPage({ + components: [ItemOption], + html: `Ionic`, + }); + + const link = page.body.querySelector('ion-item-option')!.shadowRoot!.querySelector('a')!; + + expect(link.getAttribute('rel')).toBe('noopener noreferrer'); + }); +}); diff --git a/core/src/components/popover/test/position/popover.e2e.ts-snapshots/popover-position-ios-rtl-Mobile-Chrome-linux.png b/core/src/components/popover/test/position/popover.e2e.ts-snapshots/popover-position-ios-rtl-Mobile-Chrome-linux.png index 192183c6e5b..494273cdc1b 100644 Binary files a/core/src/components/popover/test/position/popover.e2e.ts-snapshots/popover-position-ios-rtl-Mobile-Chrome-linux.png and b/core/src/components/popover/test/position/popover.e2e.ts-snapshots/popover-position-ios-rtl-Mobile-Chrome-linux.png differ diff --git a/core/src/themes/ionic.mixins.scss b/core/src/themes/ionic.mixins.scss index aa25b62abe6..8d18b01c37c 100644 --- a/core/src/themes/ionic.mixins.scss +++ b/core/src/themes/ionic.mixins.scss @@ -258,10 +258,15 @@ $rtl-use-host-context: true !default; } } - // Supported by Chrome. + // Fallback for Chrome 89 - 119, which support `:host-context()` but not + // `:dir()`. `:host-context([dir=rtl])` matches any ancestor with + // `dir="rtl"`, even when a closer ancestor sets `dir="ltr"`, so it is + // only used when `:dir()` is not available. @if $rtl-use-host-context and length($hostContextSelectors) > 0 { - @at-root #{$hostContextSelectors} { - @content; + @supports not selector(:dir(rtl)) { + @at-root #{$hostContextSelectors} { + @content; + } } } @@ -272,21 +277,14 @@ $rtl-use-host-context: true !default; } } - // If browser can support `:dir()`, then add the `:dir()` selectors. + // `:dir()` follows the direction of the nearest ancestor with a `dir` + // attribute, so it is used whenever the browser supports it. This covers + // Chrome 120+, Firefox and Safari 16.4+. + // @link https://webkit.org/blog/13966/webkit-features-in-safari-16-4/ + // In Safari 16.4 - 16.x, `:dir()` does not update when the direction + // changes after the page loads. Safari 17+ is not affected. + // @link https://bugs.webkit.org/show_bug.cgi?id=257133 @supports selector(:dir(rtl)) { - // Adding :dir() in case the browser doesn't support `:host-context()` and does support `:dir()`. - // `:host-context()` is added: - // - through the `add-root-selector()` function. - // - first so that it takes precedence over `:dir()`. - // For example, - // - Firefox doesn't support `:host-context()`, but does support `:dir()`. - // - Safari doesn't support `:host-context()`, but Safari 16.4+ supports `:dir()` - // @link https://webkit.org/blog/13966/webkit-features-in-safari-16-4/ - // -- However, there is a Webkit bug on v16 that prevents `:dir()` from working when - // -- the app direction is changed dynamically. v17+ works fine. - // -- @link https://bugs.webkit.org/show_bug.cgi?id=257133 - - // Supported by Firefox. @at-root #{add-root-selector($root, ":dir(rtl)", false)} { @content; } diff --git a/lerna.json b/lerna.json index 0d299bf26a8..9011ed906f8 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "packages/vue", "packages/vue-router" ], - "version": "9.0.12" + "version": "9.0.13" } \ No newline at end of file diff --git a/packages/angular-server/CHANGELOG.md b/packages/angular-server/CHANGELOG.md index b957499b1f7..5b765bcc52b 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. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +**Note:** Version bump only for package @ionic/angular-server + + + + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) **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 7b211e42854..858aa566ceb 100644 --- a/packages/angular-server/package-lock.json +++ b/packages/angular-server/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/angular-server", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/angular-server", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT", "dependencies": { - "@ionic/core": "^9.0.12" + "@ionic/core": "^9.0.13" }, "devDependencies": { "@angular/animations": "^22.0.0", @@ -1097,13 +1097,13 @@ } }, "node_modules/@ionic/core": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.12.tgz", - "integrity": "sha512-rq2yIoEBx9WQsm2xWfi8b61u0jBTuhKkFi4A5BOV5el477AWQoCSLkEU0mUEapZMf+SpBI+sj9VAqiN3aQkCGw==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.13.tgz", + "integrity": "sha512-0/f/QiSwuKZfEiNzXImm6lYs+a4KX2qaM90Nm+0/nno+mbM8Uh9wtbINEpo09wgdaK10kjGvmnNg+2F8bPmdFQ==", "license": "MIT", "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "engines": { @@ -1986,6 +1986,9 @@ "cpu": [ "arm64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1999,6 +2002,9 @@ "cpu": [ "arm64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2110,6 +2116,9 @@ "cpu": [ "x64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2123,6 +2132,9 @@ "cpu": [ "x64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2240,9 +2252,9 @@ "license": "MIT" }, "node_modules/@stencil/core": { - "version": "4.45.4", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.4.tgz", - "integrity": "sha512-MkGop5DULDFAorpI4/zeEqmU9KRuUaqrjprMrEdpqGXhWQ8Lkk4jqQF+lJtOa3BjPrv8j7Ux2hu6vpd4vJJUvw==", + "version": "4.45.5", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.5.tgz", + "integrity": "sha512-tz6h9MI/s0WwNsfGbSguo9+xnerWam8NI8/U3VUS9MNMviTYyg3Ymz5XniSM9PGFnbd2xhhmyJhHHaFmy9mYog==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -4444,9 +4456,9 @@ } }, "node_modules/ionicons": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.0.tgz", - "integrity": "sha512-XSM2gYWTXxSYTwjmKWAoy4yR7AbAFDjpc5ZIivAiGXskM0fe5CdMPfs6InQRUcrYtVb2WZ/0HQ1/jeh3JW78SA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.1.tgz", + "integrity": "sha512-VJjbZjjyzFmI0MAtlUKRprLpD4MbGbwcijk2aduu/a3jhGhlSUC/tQ2wM3p0/SF44/oDFdl0bdZMya3rZxnoyg==", "license": "MIT", "dependencies": { "@stencil/core": "^4.43.5" diff --git a/packages/angular-server/package.json b/packages/angular-server/package.json index c6c79d8faab..677e35362fd 100644 --- a/packages/angular-server/package.json +++ b/packages/angular-server/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/angular-server", - "version": "9.0.12", + "version": "9.0.13", "description": "Angular SSR Module for Ionic", "keywords": [ "ionic", @@ -78,6 +78,6 @@ }, "prettier": "@ionic/prettier-config", "dependencies": { - "@ionic/core": "^9.0.12" + "@ionic/core": "^9.0.13" } } diff --git a/packages/angular/CHANGELOG.md b/packages/angular/CHANGELOG.md index 0d99506fdc4..92bda539ffc 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. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +### Bug Fixes + +* **angular:** go back in browser history when popping to the previous view ([#31752](https://github.com/ionic-team/ionic-framework/issues/31752)) ([fd0ac5e](https://github.com/ionic-team/ionic-framework/commit/fd0ac5e9f340766e19f093852e596d67cd9b567a)), closes [#23448](https://github.com/ionic-team/ionic-framework/issues/23448) [#17752](https://github.com/ionic-team/ionic-framework/issues/17752) [#28307](https://github.com/ionic-team/ionic-framework/issues/28307) +* **deps:** update ionicons to v8.1.1 for svg sanitization fix ([#31790](https://github.com/ionic-team/ionic-framework/issues/31790)) ([2040b22](https://github.com/ionic-team/ionic-framework/commit/2040b22afd8a8236ebe6444ef52db88ffcff2118)), closes [#31789](https://github.com/ionic-team/ionic-framework/issues/31789) + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) **Note:** Version bump only for package @ionic/angular diff --git a/packages/angular/package-lock.json b/packages/angular/package-lock.json index 6be48938584..6d6af75d6ac 100644 --- a/packages/angular/package-lock.json +++ b/packages/angular/package-lock.json @@ -1,16 +1,16 @@ { "name": "@ionic/angular", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/angular", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT", "dependencies": { - "@ionic/core": "^9.0.12", - "ionicons": "^8.0.13", + "@ionic/core": "^9.0.13", + "ionicons": "^8.1.1", "jsonc-parser": "^3.0.0", "tslib": "^2.3.0" }, @@ -1317,13 +1317,13 @@ } }, "node_modules/@ionic/core": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.12.tgz", - "integrity": "sha512-rq2yIoEBx9WQsm2xWfi8b61u0jBTuhKkFi4A5BOV5el477AWQoCSLkEU0mUEapZMf+SpBI+sj9VAqiN3aQkCGw==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.13.tgz", + "integrity": "sha512-0/f/QiSwuKZfEiNzXImm6lYs+a4KX2qaM90Nm+0/nno+mbM8Uh9wtbINEpo09wgdaK10kjGvmnNg+2F8bPmdFQ==", "license": "MIT", "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "engines": { @@ -2121,9 +2121,9 @@ "license": "MIT" }, "node_modules/@stencil/core": { - "version": "4.45.4", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.4.tgz", - "integrity": "sha512-MkGop5DULDFAorpI4/zeEqmU9KRuUaqrjprMrEdpqGXhWQ8Lkk4jqQF+lJtOa3BjPrv8j7Ux2hu6vpd4vJJUvw==", + "version": "4.45.5", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.5.tgz", + "integrity": "sha512-tz6h9MI/s0WwNsfGbSguo9+xnerWam8NI8/U3VUS9MNMviTYyg3Ymz5XniSM9PGFnbd2xhhmyJhHHaFmy9mYog==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -4769,9 +4769,9 @@ } }, "node_modules/ionicons": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.0.tgz", - "integrity": "sha512-XSM2gYWTXxSYTwjmKWAoy4yR7AbAFDjpc5ZIivAiGXskM0fe5CdMPfs6InQRUcrYtVb2WZ/0HQ1/jeh3JW78SA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.1.tgz", + "integrity": "sha512-VJjbZjjyzFmI0MAtlUKRprLpD4MbGbwcijk2aduu/a3jhGhlSUC/tQ2wM3p0/SF44/oDFdl0bdZMya3rZxnoyg==", "license": "MIT", "dependencies": { "@stencil/core": "^4.43.5" diff --git a/packages/angular/package.json b/packages/angular/package.json index 7aa1d688033..acf9ec9bf03 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/angular", - "version": "9.0.12", + "version": "9.0.13", "description": "Angular specific wrappers for @ionic/core", "keywords": [ "ionic", @@ -168,8 +168,8 @@ "css/" ], "dependencies": { - "@ionic/core": "^9.0.12", - "ionicons": "^8.0.13", + "@ionic/core": "^9.0.13", + "ionicons": "^8.1.1", "jsonc-parser": "^3.0.0", "tslib": "^2.3.0" }, diff --git a/packages/angular/src/common/directives/navigation/router-outlet.ts b/packages/angular/src/common/directives/navigation/router-outlet.ts index ef33ad7cb1c..3143be9ee59 100644 --- a/packages/angular/src/common/directives/navigation/router-outlet.ts +++ b/packages/angular/src/common/directives/navigation/router-outlet.ts @@ -393,6 +393,8 @@ export abstract class IonRouterOutlet implements OnDestroy, OnInit { } // Updated activated route proxy for this component this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute); + // Angular creates a new `ActivatedRoute` each time the view is shown. + enteringView.activatedRoute = activatedRoute; } else { const snapshot = (activatedRoute as any)._futureSnapshot; diff --git a/packages/angular/src/common/directives/navigation/stack-controller.ts b/packages/angular/src/common/directives/navigation/stack-controller.ts index 94a7faf0b23..d9ac9bc0a5d 100644 --- a/packages/angular/src/common/directives/navigation/stack-controller.ts +++ b/packages/angular/src/common/directives/navigation/stack-controller.ts @@ -1,6 +1,6 @@ import { Location } from '@angular/common'; import { ComponentRef, NgZone } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, NavigationStart, Router } from '@angular/router'; import type { AnimationBuilder, RouterDirection } from '@ionic/core/components'; import { bindLifecycleEvents } from '../../providers/angular-delegate'; @@ -12,6 +12,7 @@ import { computeStackId, destroyView, getUrl, + hasNavigationGuards, insertView, isTabSwitch, toSegments, @@ -22,6 +23,7 @@ import { export class StackController { private views: RouteView[] = []; private runningTask?: Promise; + private historyPop?: Promise; private skipTransition = false; private tabsPrefix: string[] | undefined; private activeView: RouteView | undefined; @@ -49,6 +51,7 @@ export class StackController { element, ref, url, + activatedRoute, }; } @@ -87,18 +90,28 @@ export class StackController { } /** - * If the navigation action - * sets `replaceUrl: true` - * then we need to make sure - * we remove the last item - * from our views stack + * If the navigation sets `replaceUrl: true`, remove the last view + * from the stack. The router also sets it on browser back and + * forward, which don't replace anything. */ - if (currentNavigation?.extras?.replaceUrl) { + if (currentNavigation?.extras?.replaceUrl && currentNavigation.trigger !== 'popstate') { if (this.views.length > 0) { this.views.splice(-1, 1); } } + /** + * Child outlets can add entries while this view stays shown, so + * record the entry it's leaving from. Skip it when the view has no + * entry of its own or its URL changed in place. + */ + if (leavingView) { + const showsOwnEntry = + leavingView.historyEntryId !== undefined && getUrl(this.router, leavingView.activatedRoute) === leavingView.url; + leavingView.historyEntryId = showsOwnEntry ? this.navCtrl.getCurrentHistoryEntryId() : undefined; + } + enteringView.historyEntryId = this.navCtrl.getPendingHistoryEntryId(); + const reused = this.views.includes(enteringView); const views = this.insertView(enteringView, direction); @@ -158,6 +171,15 @@ export class StackController { pop(deep: number, stackId = this.getActiveStackId()): Promise { return this.zone.run(() => { + /** + * A second pop before the router handles `location.back()` would go + * back another entry, so reuse the pop in progress. This runs before + * `consumeTransition()` so the pending pop keeps its animation. + */ + if (deep === 1 && this.historyPop) { + return this.historyPop; + } + const views = this.getStack(stackId); if (views.length <= deep) { return Promise.resolve(false); @@ -173,8 +195,55 @@ export class StackController { } } const { animationBuilder } = this.navCtrl.consumeTransition(); - return this.navCtrl.navigateBack(url, { ...view.savedExtras, animation: animationBuilder }).then(() => true); + + /** + * Go back in history when the previous view is the entry behind this one, + * so browser back doesn't return here. Routes with guards navigate by URL + * because a canceled history navigation leaves the browser on the wrong entry. + */ + const leavingView = views[views.length - 1]; + const navigateBack = () => + this.navCtrl.navigateBack(url, { ...view.savedExtras, animation: animationBuilder }).then(() => true); + + if ( + deep === 1 && + this.navCtrl.isPreviousHistoryEntry(view.historyEntryId) && + !hasNavigationGuards(leavingView.activatedRoute, view.activatedRoute) + ) { + return this.popInHistory(animationBuilder, navigateBack); + } + + return navigateBack(); + }); + } + + /** + * The router handles `location.back()` only after the current task ends, so + * a navigation in progress or started in the same task, like a `routerLink` + * on the same button, would win over it. Navigate by URL in that case. + */ + private popInHistory(animationBuilder: AnimationBuilder | undefined, navigateBack: () => Promise) { + let otherNavigationStarted = this.router.getCurrentNavigation() !== null; + const sub = this.router.events.subscribe((ev) => { + if (ev instanceof NavigationStart) { + otherNavigationStarted = true; + } + }); + + this.historyPop = new Promise((resolve) => { + setTimeout(() => { + sub.unsubscribe(); + this.zone.run(() => { + const navigation = otherNavigationStarted + ? navigateBack() + : this.navCtrl.backInHistory(animationBuilder).then(() => true); + resolve(navigation); + }); + }); + }).finally(() => { + this.historyPop = undefined; }); + return this.historyPop; } startBackTransition(): Promise | Promise { diff --git a/packages/angular/src/common/directives/navigation/stack-utils.ts b/packages/angular/src/common/directives/navigation/stack-utils.ts index 41203407599..028073ed44b 100644 --- a/packages/angular/src/common/directives/navigation/stack-utils.ts +++ b/packages/angular/src/common/directives/navigation/stack-utils.ts @@ -1,5 +1,5 @@ import { ComponentRef } from '@angular/core'; -import { ActivatedRoute, NavigationExtras, Router } from '@angular/router'; +import { ActivatedRoute, NavigationExtras, Route, Router } from '@angular/router'; import type { AnimationBuilder, NavDirection, RouterDirection } from '@ionic/core/components'; export const insertView = (views: RouteView[], view: RouteView, direction: RouterDirection): RouteView[] => { @@ -37,6 +37,56 @@ const setBack = (views: RouteView[], view: RouteView) => { } }; +/** + * Whether going from the leaving route to the entering route runs a + * guard or resolver, any of which could cancel the navigation. Angular + * only deactivates and activates the routes below the last one the two + * share, but some checks run on every matched route. + */ +export const hasNavigationGuards = (leaving: ActivatedRoute, entering: ActivatedRoute): boolean => { + const subtree = (route: ActivatedRoute): ActivatedRoute[] => [route, ...route.children.flatMap(subtree)]; + const isSameRoute = (a: ActivatedRoute, b: ActivatedRoute) => + a.routeConfig === b.routeConfig && JSON.stringify(a.snapshot.params) === JSON.stringify(b.snapshot.params); + + const leavingPath = leaving.pathFromRoot; + const enteringPath = entering.pathFromRoot; + let shared = 0; + while ( + shared < leavingPath.length - 1 && + shared < enteringPath.length - 1 && + isSameRoute(leavingPath[shared], enteringPath[shared]) + ) { + shared++; + } + + const deactivated = [...leavingPath.slice(shared, -1), ...subtree(leaving)]; + const activated = [...enteringPath.slice(shared, -1), ...subtree(entering)]; + const matched = [...enteringPath.slice(0, -1), ...subtree(entering)]; + + return ( + deactivated.some(runsDeactivateGuard) || + activated.some(runsActivateGuardOrResolver) || + matched.some(runsOnEveryMatch) + ); +}; + +// A title that isn't a string is a resolver. +const hasResolvers = (config: Route) => + Object.keys(config.resolve ?? {}).length > 0 || (config.title !== undefined && typeof config.title !== 'string'); + +const runsDeactivateGuard = ({ routeConfig }: ActivatedRoute) => !!routeConfig?.canDeactivate?.length; + +const runsActivateGuardOrResolver = ({ routeConfig }: ActivatedRoute) => + !!routeConfig && (!!routeConfig.canActivate?.length || hasResolvers(routeConfig)); + +const runsOnEveryMatch = ({ routeConfig }: ActivatedRoute) => + !!routeConfig && + (!!routeConfig.canMatch?.length || + !!routeConfig.canActivateChild?.length || + (routeConfig.runGuardsAndResolvers !== undefined && + routeConfig.runGuardsAndResolvers !== 'paramsChange' && + (!!routeConfig.canActivate?.length || !!routeConfig.canDeactivate?.length || hasResolvers(routeConfig)))); + export const getUrl = (router: Router, activatedRoute: ActivatedRoute): string => { const urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute }); return router.serializeUrl(urlTree); @@ -110,4 +160,10 @@ export interface RouteView { savedExtras?: NavigationExtras; unlistenEvents: () => void; animationBuilder?: AnimationBuilder; + /** + * The navigation id of the history entry this view was last + * shown in, or undefined if it was shown without one. + */ + historyEntryId?: number; + activatedRoute: ActivatedRoute; } diff --git a/packages/angular/src/common/providers/nav-controller.ts b/packages/angular/src/common/providers/nav-controller.ts index 6c8d193c337..216f2345384 100644 --- a/packages/angular/src/common/providers/nav-controller.ts +++ b/packages/angular/src/common/providers/nav-controller.ts @@ -6,8 +6,10 @@ import { UrlSerializer, UrlTree, NavigationStart, + NavigationEnd, NavigationCancel, NavigationError, + NavigationSkipped, } from '@angular/router'; import type { AnimationBuilder, NavDirection, RouterDirection } from '@ionic/core/components'; @@ -35,6 +37,23 @@ export class NavController { private guessAnimation?: NavDirection; private lastNavId = -1; + /** + * Navigation ids of the history entries seen so far. `pop()` uses them to + * tell whether the previous view is the entry directly behind. + */ + private historyEntries: number[] = []; + /** Index of the current entry in `historyEntries`, or `-1` when unknown. */ + private historyIndex = -1; + /** How the navigation in progress changes history, applied on `NavigationEnd`. */ + private pendingEntry?: { + id: number | undefined; + kind: 'push' | 'replace' | 'restore' | 'none' | 'unknown'; + fromPath: string; + restoredId?: number; + /** Whether the browser was on the tracked entry when the navigation started. */ + fromTrackedEntry: boolean; + }; + constructor( platform: Platform, private location: Location, @@ -49,6 +68,37 @@ export class NavController { const id = ev.restoredState ? ev.restoredState.navigationId : ev.id; this.guessDirection = this.guessAnimation = id < this.lastNavId ? 'back' : 'forward'; this.lastNavId = this.guessDirection === 'forward' ? ev.id : id; + + const fromPath = this.location.path(); + const fromTrackedEntry = this.isOnCurrentHistoryEntry(); + if (ev.navigationTrigger === 'popstate') { + this.pendingEntry = { + id: ev.id, + kind: 'restore', + fromPath, + fromTrackedEntry, + restoredId: ev.restoredState?.navigationId, + }; + } else if (ev.navigationTrigger === 'hashchange') { + // The browser added or changed the entry itself. + this.pendingEntry = { id: undefined, kind: 'unknown', fromPath, fromTrackedEntry }; + } else { + const extras = router.getCurrentNavigation()?.extras ?? {}; + if (extras.skipLocationChange) { + this.pendingEntry = { id: undefined, kind: 'none', fromPath, fromTrackedEntry }; + } else { + this.pendingEntry = { + id: ev.id, + kind: extras.replaceUrl ? 'replace' : 'push', + fromPath, + fromTrackedEntry, + }; + } + } + } + + if (ev instanceof NavigationEnd) { + this.commitHistoryEntry(ev.id); } // Reset explicit direction when navigation is canceled (e.g., guard rejection) @@ -57,6 +107,22 @@ export class NavController { this.direction = DEFAULT_DIRECTION; this.animated = DEFAULT_ANIMATED; this.animationBuilder = undefined; + + /** + * Drop the tracked history if the browser might not be on the tracked + * entry anymore. An error can come after the URL was written, and the + * router may have rewritten an untracked entry to look tracked. + */ + const pending = this.pendingEntry; + if ( + ev instanceof NavigationError || + pending?.kind === 'restore' || + !pending?.fromTrackedEntry || + !this.isOnCurrentHistoryEntry() + ) { + this.resetHistoryEntries(); + } + this.pendingEntry = undefined; } }); } @@ -182,6 +248,118 @@ export class NavController { this.animationBuilder = animationBuilder; } + /** + * @internal + * Goes back one history entry with a `back` transition and resolves + * once the router has handled it. + */ + backInHistory(animationBuilder?: AnimationBuilder): Promise { + const settled = new Promise((resolve) => { + const sub = this.router!.events.subscribe((ev) => { + if (ev instanceof NavigationSkipped) { + // Nothing transitions, so clear the direction here. + this.consumeTransition(); + } + if ( + ev instanceof NavigationEnd || + ev instanceof NavigationCancel || + ev instanceof NavigationError || + ev instanceof NavigationSkipped + ) { + sub.unsubscribe(); + resolve(); + } + }); + }); + this.back({ animation: animationBuilder }); + return settled; + } + + /** + * @internal + * The id of the history entry the navigation in progress shows, + * recorded on the view it activates. + */ + getPendingHistoryEntryId(): number | undefined { + return this.pendingEntry ? this.pendingEntry.id : this.router?.getCurrentNavigation()?.id; + } + + /** + * @internal + * The id of the history entry currently shown, if known. + */ + getCurrentHistoryEntryId(): number | undefined { + return this.historyIndex >= 0 ? this.historyEntries[this.historyIndex] : undefined; + } + + /** + * @internal + * Whether the given history entry is the one directly behind + * the current entry, so going back in history lands on it. + */ + isPreviousHistoryEntry(entryId: number | undefined): boolean { + return ( + entryId !== undefined && + this.historyIndex > 0 && + this.isOnCurrentHistoryEntry() && + this.historyEntries[this.historyIndex - 1] === entryId + ); + } + + /** + * Entries added outside the router, like with `Location.go()`, aren't + * tracked, so check the browser is on the tracked entry. + */ + private isOnCurrentHistoryEntry(): boolean { + const currentId = (this.location.getState() as { navigationId?: number } | null)?.navigationId; + return this.historyIndex >= 0 && currentId === this.historyEntries[this.historyIndex]; + } + + private commitHistoryEntry(navigationId: number) { + const pending = this.pendingEntry; + this.pendingEntry = undefined; + + if (pending?.kind === 'none') { + return; + } + + let index = -1; + if (pending?.kind === 'restore' && pending.restoredId !== undefined) { + index = this.historyEntries.indexOf(pending.restoredId); + } else if ((pending?.kind === 'push' || pending?.kind === 'replace') && pending.fromTrackedEntry) { + index = this.historyIndex; + } + + /** + * There's no known entry to anchor to, so start over from this one. The + * first navigation can start before this service is created. + */ + if (pending === undefined || pending.kind === 'unknown' || index < 0) { + this.historyEntries = [navigationId]; + this.historyIndex = 0; + return; + } + + /** + * The router replaces the current entry instead of pushing when asked + * to, or when the URL doesn't change. Like the router, compare the old + * path without its hash to the new one with it. + */ + const replaced = pending.kind !== 'push' || this.location.path(true) === pending.fromPath; + if (!replaced) { + index++; + this.historyEntries.length = index; + } + // The router writes this navigation's id into the entry, replacing any old one. + this.historyEntries[index] = navigationId; + this.historyIndex = index; + } + + private resetHistoryEntries() { + this.historyEntries = []; + this.historyIndex = -1; + } + /** * @internal */ diff --git a/packages/angular/test/base/e2e/src/lazy/tabs.spec.ts b/packages/angular/test/base/e2e/src/lazy/tabs.spec.ts index 51c9650517f..e125a1af712 100644 --- a/packages/angular/test/base/e2e/src/lazy/tabs.spec.ts +++ b/packages/angular/test/base/e2e/src/lazy/tabs.spec.ts @@ -106,6 +106,24 @@ test.describe('Tabs', () => { await testState(page, 3, 'account'); }); + test('should go back in history with the back button within a tab', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/23448', + }); + + const tab = await getSelectedTab(page); + await tab.locator('#goto-tab1-page2').click(); + await testTabTitle(page, 'Tab 1 - Page 2 (1)'); + + await page.locator('ion-back-button').click(); + await testTabTitle(page, 'Tab 1 - Page 1'); + + // Page 2 is still the forward entry, so no entry was pushed. + await page.goForward(); + await testTabTitle(page, 'Tab 1 - Page 2 (1)'); + }); + test('should navigate deep then go home', async ({ page }) => { const tab = await getSelectedTab(page); await tab.locator('#goto-tab1-page2').click(); @@ -339,6 +357,27 @@ test.describe('Tabs', () => { tab = await getSelectedTab(page); await expect(tab.locator('ion-title')).toContainText('Tab 1 - Page 1'); }); + + test('should go back in history when leaving the tabs outlet after navigating within a tab', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/23448', + }); + + await page.locator('#goto-tab1-page2').click(); + await testTabTitle(page, 'Tab 1 - Page 2 (1)'); + + await page.locator('#goto-global').click(); + await expect(page.locator('ion-title').filter({ hasText: 'Global Page' })).toBeVisible(); + + await page.locator('#goto-prev-pop').click(); + await testTabTitle(page, 'Tab 1 - Page 2 (1)'); + await ionPageDoesNotExist(page, 'app-tabs-global'); + + // The global page is still the forward entry, so no entry was pushed. + await page.goForward(); + await expect(page.locator('ion-title').filter({ hasText: 'Global Page' })).toBeVisible(); + }); }); test.describe('entry url - /', () => { diff --git a/packages/angular/test/base/e2e/src/standalone/back-history.spec.ts b/packages/angular/test/base/e2e/src/standalone/back-history.spec.ts new file mode 100644 index 00000000000..7d78cbc4f91 --- /dev/null +++ b/packages/angular/test/base/e2e/src/standalone/back-history.spec.ts @@ -0,0 +1,343 @@ +import { test, expect, type Page, type TestInfo } from '@playwright/test'; +import { ionPageHidden, ionPageVisible } from '../../utils/test-utils'; +import { ionSwipeToGoBack } from '../../utils/drag-utils'; + +const historyLength = (page: Page) => page.evaluate(() => window.history.length); + +const annotateIssue = (testInfo: TestInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/23448', + }); +}; + +const goToC = async (page: Page) => { + await ionPageVisible(page, 'app-back-history-a'); + + await page.locator('#go-to-b').click(); + await ionPageVisible(page, 'app-back-history-b'); + + await page.locator('#go-to-c').click(); + await ionPageVisible(page, 'app-back-history-c'); +}; + +test.describe('Back navigation browser history', () => { + test.beforeEach(async ({ page }) => { + await page.goto('/standalone/back-history?ionic:_testing=true'); + await goToC(page); + }); + + test('ion-back-button should go back in history instead of adding an entry', async ({ page }, testInfo) => { + annotateIssue(testInfo); + const lengthOnC = await historyLength(page); + + await page.locator('app-back-history-c ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-b'); + await expect(page).toHaveURL(/\/standalone\/back-history\/b$/); + expect(await historyLength(page)).toBe(lengthOnC); + + await page.goBack(); + await ionPageVisible(page, 'app-back-history-a'); + await expect(page).toHaveURL(/\/standalone\/back-history(\?|$)/); + }); + + test('ion-back-button should keep going back in history on a page it already went back to', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator('app-back-history-c ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-b'); + await expect(page.locator('app-back-history-c')).toHaveCount(0); + + await page.locator('#go-to-c').click(); + await ionPageVisible(page, 'app-back-history-c'); + + await page.locator('app-back-history-c ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-b'); + + await page.locator('app-back-history-b ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-a'); + + await expect(page.locator('app-back-history-b')).toHaveCount(0); + + // B is still the forward entry, so no entry was pushed. + await page.goForward(); + await ionPageVisible(page, 'app-back-history-b'); + }); + + test('should go back in history after the previous page was replaced', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.goBack(); + await ionPageVisible(page, 'app-back-history-b'); + await expect(page.locator('app-back-history-c')).toHaveCount(0); + + // B is replaced by C, so A is the entry directly behind C. + await page.locator('#replace-with-c').click(); + await ionPageVisible(page, 'app-back-history-c'); + + await page.locator('app-back-history-c ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-a'); + await expect(page).toHaveURL(/\/standalone\/back-history(\?|$)/); + + await expect(page.locator('app-back-history-c')).toHaveCount(0); + + // C is still the forward entry, so no entry was pushed. + await page.goForward(); + await ionPageVisible(page, 'app-back-history-c'); + }); + + test('should go back in history to the root set with navigateRoot', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.goBack(); + await ionPageVisible(page, 'app-back-history-b'); + await expect(page.locator('app-back-history-c')).toHaveCount(0); + + await page.locator('#root-to-c').click(); + await ionPageVisible(page, 'app-back-history-c'); + + await page.locator('#go-to-d').click(); + await ionPageVisible(page, 'app-back-history-d'); + const lengthOnD = await historyLength(page); + + await page.locator('app-back-history-d ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-c'); + expect(await historyLength(page)).toBe(lengthOnD); + + // The browser still has B behind the new root. + await page.goBack(); + await ionPageVisible(page, 'app-back-history-b'); + }); + + test('should keep history intact when a guard blocks leaving the page', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator('#go-to-guarded').click(); + await ionPageVisible(page, 'app-back-history-guarded'); + + await page.locator('#block-leave').click(); + await page.locator('app-back-history-guarded ion-back-button').click(); + await expect(page).toHaveURL(/\/standalone\/back-history\/guarded$/); + await ionPageVisible(page, 'app-back-history-guarded'); + + // C is still the entry behind the guarded page. + await page.locator('#block-leave').click(); + await page.goBack(); + await ionPageVisible(page, 'app-back-history-c'); + await expect(page).toHaveURL(/\/standalone\/back-history\/c$/); + }); + + test('should go back in history after a guard blocks going forward', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator('#go-to-d').click(); + await ionPageVisible(page, 'app-back-history-d'); + + await page.locator('#block-guards').click(); + await page.locator('#d-go-to-wrapped').click(); + await ionPageVisible(page, 'app-back-history-d'); + await expect(page.locator('app-back-history-wrapped')).toHaveCount(0); + + await page.locator('app-back-history-d ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-c'); + await expect(page.locator('app-back-history-d')).toHaveCount(0); + + // D is still the forward entry, so no entry was pushed. + await page.goForward(); + await ionPageVisible(page, 'app-back-history-d'); + }); + + test('ion-back-button should go back after a blocked navigation on a URL changed outside the router', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator('#go-to-d').click(); + await ionPageVisible(page, 'app-back-history-d'); + + await page.locator('#d-shallow-url-update').click(); + await expect(page).toHaveURL(/\/standalone\/back-history\/d\?shallow=1$/); + + await page.locator('#block-guards').click(); + await page.locator('#d-go-to-wrapped').click(); + await expect(page).toHaveURL(/\/standalone\/back-history\/d$/); + + await page.locator('app-back-history-d ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-c'); + }); + + test('ion-back-button should go back to the page left after its URL was replaced outside the router', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator('#go-to-d').click(); + await ionPageVisible(page, 'app-back-history-d'); + + await page.locator('#d-replace-url-with-b').click(); + await expect(page).toHaveURL(/\/standalone\/back-history\/b$/); + + await page.locator('#d-go-to-wrapped').click(); + await ionPageVisible(page, 'app-back-history-wrapped'); + + await page.locator('app-back-history-wrapped ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-d'); + }); + + test('should go back in history after a guard redirects the navigation', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator('#go-to-redirected').click(); + await ionPageVisible(page, 'app-back-history-d'); + await expect(page).toHaveURL(/\/standalone\/back-history\/d$/); + + await page.locator('app-back-history-d ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-c'); + await expect(page.locator('app-back-history-d')).toHaveCount(0); + + // D is still the forward entry, so no entry was pushed. + await page.goForward(); + await ionPageVisible(page, 'app-back-history-d'); + }); + + test('ion-back-button should go back when the URL was changed outside the router', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator('#shallow-url-update').click(); + await expect(page).toHaveURL(/\/standalone\/back-history\/c\?shallow=1$/); + + await page.locator('app-back-history-c ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-b'); + }); + + for (const { name, link, url } of [ + { name: 'a guard on a parent route', link: '#go-to-wrapped', url: /\/wrapped$/ }, + { name: 'a resolver', link: '#go-to-resolved', url: /\/resolved$/ }, + ]) { + test(`should keep history intact when ${name} blocks going back`, async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.locator(link).click(); + await ionPageVisible(page, 'app-back-history-wrapped'); + + await page.locator('#wrapped-go-to-d').click(); + await ionPageVisible(page, 'app-back-history-d'); + + await page.locator('#block-guards').click(); + await page.locator('app-back-history-d ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-d'); + + // The page is still the entry behind D. + await page.locator('#block-guards').click(); + await page.goBack(); + await ionPageVisible(page, 'app-back-history-wrapped'); + await expect(page).toHaveURL(url); + }); + } +}); + +test.describe('Back navigation browser history: skipLocationChange', () => { + test.beforeEach(async ({ page }) => { + await page.goto('/standalone/back-history?ionic:_testing=true'); + }); + + test('should go back to a page shown without changing the URL', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await ionPageVisible(page, 'app-back-history-a'); + + await page.locator('#go-to-b-skip-location').click(); + await ionPageVisible(page, 'app-back-history-b'); + + await page.locator('#go-to-c').click(); + await ionPageVisible(page, 'app-back-history-c'); + + await page.locator('app-back-history-c ion-back-button').click(); + await ionPageVisible(page, 'app-back-history-b'); + }); +}); + +test.describe('Back navigation browser history: double tap', () => { + test('should not go back past the root of the stack', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.goto('/standalone/back-history?ionic:_testing=true'); + await ionPageVisible(page, 'app-back-history-a'); + + await page.locator('#go-to-b').click(); + await ionPageVisible(page, 'app-back-history-b'); + + // B is no longer in the stack, but it's still the entry behind C. + await page.locator('#root-to-c').click(); + await ionPageVisible(page, 'app-back-history-c'); + + await page.locator('#go-to-d').click(); + await ionPageVisible(page, 'app-back-history-d'); + + await page.locator('app-back-history-d ion-back-button').dblclick(); + await ionPageVisible(page, 'app-back-history-c'); + await expect(page.locator('app-back-history-d')).toHaveCount(0); + await expect(page).toHaveURL(/\/standalone\/back-history\/c$/); + }); + + test('should not leave the app', async ({ page }, testInfo) => { + annotateIssue(testInfo); + + await page.goto('about:blank'); + await page.goto('/standalone/back-history/c?ionic:_testing=true'); + await ionPageVisible(page, 'app-back-history-c'); + + await page.locator('#go-to-d').click(); + await ionPageVisible(page, 'app-back-history-d'); + + await page.locator('app-back-history-d ion-back-button').dblclick(); + await ionPageVisible(page, 'app-back-history-c'); + await expect(page.locator('app-back-history-d')).toHaveCount(0); + await expect(page).toHaveURL(/\/standalone\/back-history\/c(\?|$)/); + }); +}); + +test.describe('Back navigation browser history: NavController.pop() and hardware back button', () => { + test.beforeEach(async ({ page }) => { + await page.goto('/standalone/back-history?ionic:_testing=true&ionic:hardwareBackButton=true'); + await goToC(page); + }); + + for (const { name, goBack } of [ + { name: 'NavController.pop()', goBack: (page: Page) => page.locator('#nav-pop').click() }, + { + name: 'the hardware back button', + goBack: (page: Page) => page.evaluate(() => document.dispatchEvent(new Event('backbutton'))), + }, + ]) { + test(`${name} should go back in history instead of adding an entry`, async ({ page }, testInfo) => { + annotateIssue(testInfo); + const lengthOnC = await historyLength(page); + + await goBack(page); + await ionPageVisible(page, 'app-back-history-b'); + expect(await historyLength(page)).toBe(lengthOnC); + + await page.goBack(); + await ionPageVisible(page, 'app-back-history-a'); + }); + } +}); + +test.describe('Back navigation browser history: swipe to go back', () => { + test.beforeEach(async ({ page }) => { + await page.goto('/standalone/back-history?ionic:mode=ios'); + await goToC(page); + }); + + test('should go back in history instead of adding an entry', async ({ page }, testInfo) => { + annotateIssue(testInfo); + // The swipe can only start once the transition to C has finished. + await ionPageHidden(page, 'app-back-history-b'); + const lengthOnC = await historyLength(page); + + await ionSwipeToGoBack(page, true); + await ionPageVisible(page, 'app-back-history-b'); + await expect(page.locator('app-back-history-c')).toHaveCount(0); + expect(await historyLength(page)).toBe(lengthOnC); + + await page.goBack(); + await ionPageVisible(page, 'app-back-history-a'); + }); +}); diff --git a/packages/angular/test/base/src/app/standalone/app-standalone/app.routes.ts b/packages/angular/test/base/src/app/standalone/app-standalone/app.routes.ts index 37a2bae6314..65b3805eef7 100644 --- a/packages/angular/test/base/src/app/standalone/app-standalone/app.routes.ts +++ b/packages/angular/test/base/src/app/standalone/app-standalone/app.routes.ts @@ -1,4 +1,7 @@ -import { Routes } from '@angular/router'; +import { inject } from '@angular/core'; +import { Router, Routes } from '@angular/router'; +import { EMPTY, of } from 'rxjs'; +import { BackHistoryBlockService } from '../back-history/back-history-block.service'; import { AppComponent } from './app.component'; export const routes: Routes = [ @@ -45,6 +48,43 @@ export const routes: Routes = [ ] }, { path: 'back-button', loadComponent: () => import('../back-button/back-button.component').then(c => c.BackButtonComponent) }, + { + path: 'back-history', + loadComponent: () => import('../back-history/back-history.component').then(c => c.BackHistoryComponent), + // A guard on a parent the pages share, which doesn't run when going back. + canActivate: [() => true], + children: [ + { path: '', loadComponent: () => import('../back-history/back-history-a.component').then(c => c.BackHistoryAComponent) }, + { path: 'b', loadComponent: () => import('../back-history/back-history-b.component').then(c => c.BackHistoryBComponent) }, + { path: 'c', loadComponent: () => import('../back-history/back-history-c.component').then(c => c.BackHistoryCComponent) }, + { path: 'd', loadComponent: () => import('../back-history/back-history-d.component').then(c => c.BackHistoryDComponent) }, + { + path: 'guarded', + loadComponent: () => import('../back-history/back-history-guarded.component').then(c => c.BackHistoryGuardedComponent), + canDeactivate: [(component: { blockLeave: boolean }) => !component.blockLeave] + }, + { + // A guard on a componentless parent of the page. + path: 'wrapped', + canActivate: [() => !inject(BackHistoryBlockService).block], + children: [ + { path: '', loadComponent: () => import('../back-history/back-history-wrapped.component').then(c => c.BackHistoryWrappedComponent) }, + ] + }, + { + // A guard that redirects cancels the navigation without changing history. + path: 'redirected', + canActivate: [() => inject(Router).parseUrl('/standalone/back-history/d')], + children: [] + }, + { + // A resolver that emits nothing cancels the navigation. + path: 'resolved', + resolve: { item: () => (inject(BackHistoryBlockService).block ? EMPTY : of(true)) }, + loadComponent: () => import('../back-history/back-history-wrapped.component').then(c => c.BackHistoryWrappedComponent) + }, + ] + }, { path: 'router-link', loadComponent: () => import('../router-link/router-link.component').then(c => c.RouterLinkComponent) }, { path: 'nav', loadComponent: () => import('../nav/nav.component').then(c => c.NavComponent) }, { path: 'nav-modal-root', loadComponent: () => import('../nav-modal-root/nav-modal-root.component').then(c => c.NavModalRootComponent) }, diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history-a.component.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history-a.component.ts new file mode 100644 index 00000000000..d94f64559fe --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history-a.component.ts @@ -0,0 +1,27 @@ +import { Component, inject } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { IonButton, IonContent, IonHeader, IonRouterLink, IonTitle, IonToolbar, NavController } from '@ionic/angular'; + +@Component({ + selector: 'app-back-history-a', + template: ` + + + Page A + + + + Go to B + Go to B without changing the URL + + `, + standalone: true, + imports: [IonButton, IonContent, IonHeader, IonRouterLink, IonTitle, IonToolbar, RouterModule], +}) +export class BackHistoryAComponent { + private navCtrl = inject(NavController); + + goToBSkipLocation() { + this.navCtrl.navigateForward('/standalone/back-history/b', { skipLocationChange: true }); + } +} diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history-b.component.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history-b.component.ts new file mode 100644 index 00000000000..ea8457fe5e7 --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history-b.component.ts @@ -0,0 +1,45 @@ +import { Component, inject } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { + IonBackButton, + IonButton, + IonButtons, + IonContent, + IonHeader, + IonRouterLink, + IonTitle, + IonToolbar, + NavController, +} from '@ionic/angular'; + +@Component({ + selector: 'app-back-history-b', + template: ` + + + + + + Page B + + + + Go to C + Replace with C + Set C as root + + `, + standalone: true, + imports: [IonBackButton, IonButton, IonButtons, IonContent, IonHeader, IonRouterLink, IonTitle, IonToolbar, RouterModule], +}) +export class BackHistoryBComponent { + private navCtrl = inject(NavController); + + replaceWithC() { + this.navCtrl.navigateForward('/standalone/back-history/c', { replaceUrl: true }); + } + + rootToC() { + this.navCtrl.navigateRoot('/standalone/back-history/c'); + } +} diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history-block.service.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history-block.service.ts new file mode 100644 index 00000000000..9f0531b0123 --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history-block.service.ts @@ -0,0 +1,9 @@ +import { Injectable } from '@angular/core'; + +/** + * Read by the guard on the wrapped route and the resolver on the resolved route. + */ +@Injectable({ providedIn: 'root' }) +export class BackHistoryBlockService { + block = false; +} diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history-c.component.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history-c.component.ts new file mode 100644 index 00000000000..8c1359ab24f --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history-c.component.ts @@ -0,0 +1,51 @@ +import { Location } from '@angular/common'; +import { Component, inject } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { + IonBackButton, + IonButton, + IonButtons, + IonContent, + IonHeader, + IonRouterLink, + IonTitle, + IonToolbar, + NavController, +} from '@ionic/angular'; + +@Component({ + selector: 'app-back-history-c', + template: ` + + + + + + Page C + + + + NavController.pop() + Go to D + Go to guarded page + Go to wrapped page + Go to resolved page + Go to a page that redirects to D + Update the URL outside the router + + `, + standalone: true, + imports: [IonBackButton, IonButton, IonButtons, IonContent, IonHeader, IonRouterLink, IonTitle, IonToolbar, RouterModule], +}) +export class BackHistoryCComponent { + private navCtrl = inject(NavController); + private location = inject(Location); + + pop() { + this.navCtrl.pop(); + } + + shallowUrlUpdate() { + this.location.go('/standalone/back-history/c?shallow=1'); + } +} diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history-d.component.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history-d.component.ts new file mode 100644 index 00000000000..4b29f22d2db --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history-d.component.ts @@ -0,0 +1,63 @@ +import { Location } from '@angular/common'; +import { Component, inject } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { + IonBackButton, + IonButton, + IonButtons, + IonCheckbox, + IonContent, + IonHeader, + IonRouterLink, + IonTitle, + IonToolbar, +} from '@ionic/angular'; + +import { BackHistoryBlockService } from './back-history-block.service'; + +@Component({ + selector: 'app-back-history-d', + template: ` + + + + + + Page D + + + + + Block guarded pages + + Go to wrapped page + Update the URL outside the router + Replace the URL with B outside the router + + `, + standalone: true, + imports: [ + IonBackButton, + IonButton, + IonButtons, + IonCheckbox, + IonContent, + IonHeader, + IonRouterLink, + IonTitle, + IonToolbar, + RouterModule, + ], +}) +export class BackHistoryDComponent { + blocker = inject(BackHistoryBlockService); + private location = inject(Location); + + shallowUrlUpdate() { + this.location.go('/standalone/back-history/d?shallow=1'); + } + + replaceUrlWithB() { + this.location.replaceState('/standalone/back-history/b'); + } +} diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history-guarded.component.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history-guarded.component.ts new file mode 100644 index 00000000000..8aa2543424b --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history-guarded.component.ts @@ -0,0 +1,29 @@ +import { Component } from '@angular/core'; +import { IonBackButton, IonButtons, IonCheckbox, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular'; + +@Component({ + selector: 'app-back-history-guarded', + template: ` + + + + + + Guarded Page + + + + + Block leaving + + + `, + standalone: true, + imports: [IonBackButton, IonButtons, IonCheckbox, IonContent, IonHeader, IonTitle, IonToolbar], +}) +export class BackHistoryGuardedComponent { + /** + * Read by the route's canDeactivate guard. + */ + blockLeave = false; +} diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history-wrapped.component.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history-wrapped.component.ts new file mode 100644 index 00000000000..1c2b1aa7aec --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history-wrapped.component.ts @@ -0,0 +1,32 @@ +import { Component } from '@angular/core'; +import { RouterModule } from '@angular/router'; +import { + IonBackButton, + IonButton, + IonButtons, + IonContent, + IonHeader, + IonRouterLink, + IonTitle, + IonToolbar, +} from '@ionic/angular'; + +@Component({ + selector: 'app-back-history-wrapped', + template: ` + + + + + + Wrapped Page + + + + Go to D + + `, + standalone: true, + imports: [IonBackButton, IonButton, IonButtons, IonContent, IonHeader, IonRouterLink, IonTitle, IonToolbar, RouterModule], +}) +export class BackHistoryWrappedComponent {} diff --git a/packages/angular/test/base/src/app/standalone/back-history/back-history.component.ts b/packages/angular/test/base/src/app/standalone/back-history/back-history.component.ts new file mode 100644 index 00000000000..b1b8f461950 --- /dev/null +++ b/packages/angular/test/base/src/app/standalone/back-history/back-history.component.ts @@ -0,0 +1,10 @@ +import { Component } from '@angular/core'; +import { IonRouterOutlet } from '@ionic/angular'; + +@Component({ + selector: 'app-back-history', + template: ``, + standalone: true, + imports: [IonRouterOutlet], +}) +export class BackHistoryComponent {} diff --git a/packages/angular/test/base/src/app/standalone/home-page/home-page.component.html b/packages/angular/test/base/src/app/standalone/home-page/home-page.component.html index 9c48d60f5fb..7e307823c5e 100644 --- a/packages/angular/test/base/src/app/standalone/home-page/home-page.component.html +++ b/packages/angular/test/base/src/app/standalone/home-page/home-page.component.html @@ -18,6 +18,11 @@ Back Button Test + + + Back History Test + + Button Test diff --git a/packages/docs/CHANGELOG.md b/packages/docs/CHANGELOG.md index 554577cdd0f..33131ce8292 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. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +**Note:** Version bump only for package @ionic/docs + + + + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) **Note:** Version bump only for package @ionic/docs diff --git a/packages/docs/package-lock.json b/packages/docs/package-lock.json index 26e306add96..edf6fae23ee 100644 --- a/packages/docs/package-lock.json +++ b/packages/docs/package-lock.json @@ -1,12 +1,12 @@ { "name": "@ionic/docs", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@ionic/docs", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT" } } diff --git a/packages/docs/package.json b/packages/docs/package.json index 994108baf27..9ad049428c2 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/docs", - "version": "9.0.12", + "version": "9.0.13", "description": "Pre-packaged API documentation for the Ionic docs.", "main": "core.json", "types": "core.d.ts", diff --git a/packages/migrate/package-lock.json b/packages/migrate/package-lock.json index 1754594a634..0d9684d3a9f 100644 --- a/packages/migrate/package-lock.json +++ b/packages/migrate/package-lock.json @@ -980,16 +980,16 @@ } }, "node_modules/@vitest/mocker": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.0.tgz", - "integrity": "sha512-5umB9/jlWcqVS6fsrFmv5Gdnpu6wAUio/lEOwAmvB7v+lFo/IW2B9FhAD0p19GCULTgMzLCdUmuCDCnAzWgppQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.1.tgz", + "integrity": "sha512-b2OgTB4+3ImWIVafXKazJXwLKwQxUNnix6b3xUvUTMh7RyXlrtzoxfZr8aEz9zkHOMAS4K5lu3TvFWoiVeVTQg==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.31", - "@vitest/spy": "5.1.0", + "@vitest/spy": "5.1.1", "estree-walker": "^3.0.3", - "magic-string": "^1.4.3" + "magic-string": "^1.4.5" }, "funding": { "url": "https://opencollective.com/vitest" @@ -1008,9 +1008,9 @@ } }, "node_modules/@vitest/spy": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.0.tgz", - "integrity": "sha512-2DPO5OMHWKrBngC+fCmTQqemNF0gidRhp3lxbBmRhW+M1XJrfgPpqNqWVevXtn2f2ufD5ZaR1B6B641aAlcX5A==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.1.tgz", + "integrity": "sha512-6K8C6alQG1/Yc8/ZI22iJS7JEsxPdVzqtqDq+/xM4Z0mGVykemMVjLhqMy/q6/IHYG3kKD8hKSwRen/ZdyI9vQ==", "dev": true, "license": "MIT", "funding": { @@ -1151,9 +1151,9 @@ } }, "node_modules/magic-string": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.3.tgz", - "integrity": "sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", "dev": true, "license": "MIT", "dependencies": { @@ -1330,9 +1330,9 @@ "license": "MIT" }, "node_modules/tinybench": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.2.tgz", - "integrity": "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.4.tgz", + "integrity": "sha512-SQ52jEncXxbMCzJuY2A/jGIbbAu6NYsBWW7grz2pNE+EnzQdoGaoBfpk4qC/opE7qiUcGmGgaGIz5EoHdS1O9w==", "dev": true, "license": "MIT", "engines": { @@ -1509,22 +1509,22 @@ } }, "node_modules/vitest": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.0.tgz", - "integrity": "sha512-MzmNFnrwa8v8lF1bLxw3UJ4EREwVOVb75VqJZmUDRjJ6EluK/x9th7qTbaeDk41WxE1GxWqmTXcdsfobfH5sOA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-5.1.1.tgz", + "integrity": "sha512-trVmzUFOSraCZcI3uZIMD5FqBh4atFkC/XuJP/IU7qtyQay0FCs3Ia+0QiQ2JJwGyWG/xrcBoJNel2+O7kEZ0g==", "dev": true, "license": "MIT", "dependencies": { "@types/chai": "^5.2.2", - "@vitest/mocker": "5.1.0", + "@vitest/mocker": "5.1.1", "chai": "^6.3.0", "es-module-lexer": "^2.3.2", "expect-type": "^1.4.0", - "magic-string": "^1.4.3", + "magic-string": "^1.4.5", "obug": "^3.0.0", "picomatch": "^4.0.7", "std-env": "^4.3.0", - "tinybench": "^6.2.2", + "tinybench": "^6.2.3", "tinyexec": "^1.3.1", "tinyglobby": "^0.2.17", "why-is-node-running": "3.2.1" @@ -1542,12 +1542,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "5.1.0", - "@vitest/browser-preview": "5.1.0", + "@vitest/browser-playwright": "5.1.1", + "@vitest/browser-preview": "5.1.1", "@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0", - "@vitest/coverage-istanbul": "5.1.0", - "@vitest/coverage-v8": "5.1.0", - "@vitest/ui": "5.1.0", + "@vitest/coverage-istanbul": "5.1.1", + "@vitest/coverage-v8": "5.1.1", + "@vitest/ui": "5.1.1", "happy-dom": "*", "jsdom": "*", "vite": "^6.4.0 || ^7.0.0 || ^8.0.0" diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index b564294a14e..f00d9723668 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. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +**Note:** Version bump only for package @ionic/react-router + + + + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) **Note:** Version bump only for package @ionic/react-router diff --git a/packages/react-router/package-lock.json b/packages/react-router/package-lock.json index 913ee086df5..d124ed40d6b 100644 --- a/packages/react-router/package-lock.json +++ b/packages/react-router/package-lock.json @@ -1,16 +1,16 @@ { "name": "@ionic/react-router", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/react-router", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT", "dependencies": { - "@ionic/core": "^9.0.12", - "@ionic/react": "^9.0.12", + "@ionic/core": "^9.0.13", + "@ionic/react": "^9.0.13", "tslib": "*" }, "devDependencies": { @@ -257,13 +257,13 @@ } }, "node_modules/@ionic/core": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.12.tgz", - "integrity": "sha512-rq2yIoEBx9WQsm2xWfi8b61u0jBTuhKkFi4A5BOV5el477AWQoCSLkEU0mUEapZMf+SpBI+sj9VAqiN3aQkCGw==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.13.tgz", + "integrity": "sha512-0/f/QiSwuKZfEiNzXImm6lYs+a4KX2qaM90Nm+0/nno+mbM8Uh9wtbINEpo09wgdaK10kjGvmnNg+2F8bPmdFQ==", "license": "MIT", "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "engines": { @@ -297,14 +297,14 @@ } }, "node_modules/@ionic/react": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/react/-/react-9.0.12.tgz", - "integrity": "sha512-z1BzXKFZxpy8H0fJQs7nVX2J5ssy9OqDlwtu9l3D3Qs5XsuacQ9ZsKak08Fh5x21RlhUIrF00EJYCB3UuKkw7g==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/react/-/react-9.0.13.tgz", + "integrity": "sha512-hM7pbu6Mp6hqj52NSouM2smNLiVSPJhKhv3xIXU/QYI6yHer2NOVd29+R+eaX+SjQMjTGoadX0Lxl1NjMTswag==", "license": "MIT", "dependencies": { - "@ionic/core": "9.0.12", + "@ionic/core": "9.0.13", "@stencil/react-output-target": "^1.7.0", - "ionicons": "^8.0.13", + "ionicons": "^8.1.1", "tslib": "*" }, "peerDependencies": { @@ -778,9 +778,9 @@ "license": "MIT" }, "node_modules/@stencil/core": { - "version": "4.45.4", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.4.tgz", - "integrity": "sha512-MkGop5DULDFAorpI4/zeEqmU9KRuUaqrjprMrEdpqGXhWQ8Lkk4jqQF+lJtOa3BjPrv8j7Ux2hu6vpd4vJJUvw==", + "version": "4.45.5", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.5.tgz", + "integrity": "sha512-tz6h9MI/s0WwNsfGbSguo9+xnerWam8NI8/U3VUS9MNMviTYyg3Ymz5XniSM9PGFnbd2xhhmyJhHHaFmy9mYog==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -2836,9 +2836,9 @@ } }, "node_modules/ionicons": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.0.tgz", - "integrity": "sha512-XSM2gYWTXxSYTwjmKWAoy4yR7AbAFDjpc5ZIivAiGXskM0fe5CdMPfs6InQRUcrYtVb2WZ/0HQ1/jeh3JW78SA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.1.tgz", + "integrity": "sha512-VJjbZjjyzFmI0MAtlUKRprLpD4MbGbwcijk2aduu/a3jhGhlSUC/tQ2wM3p0/SF44/oDFdl0bdZMya3rZxnoyg==", "license": "MIT", "dependencies": { "@stencil/core": "^4.43.5" diff --git a/packages/react-router/package.json b/packages/react-router/package.json index e612d535524..790daab1f5c 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react-router", - "version": "9.0.12", + "version": "9.0.13", "description": "React Router wrapper for @ionic/react", "keywords": [ "ionic", @@ -37,8 +37,8 @@ "dist/" ], "dependencies": { - "@ionic/core": "^9.0.12", - "@ionic/react": "^9.0.12", + "@ionic/core": "^9.0.13", + "@ionic/react": "^9.0.13", "tslib": "*" }, "peerDependencies": { diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 3a04a25f43c..9b9865a4cad 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +### Bug Fixes + +* **deps:** update ionicons to v8.1.1 for svg sanitization fix ([#31790](https://github.com/ionic-team/ionic-framework/issues/31790)) ([2040b22](https://github.com/ionic-team/ionic-framework/commit/2040b22afd8a8236ebe6444ef52db88ffcff2118)), closes [#31789](https://github.com/ionic-team/ionic-framework/issues/31789) + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) **Note:** Version bump only for package @ionic/react diff --git a/packages/react/package-lock.json b/packages/react/package-lock.json index 264cf12b1c1..c8614ff9fb0 100644 --- a/packages/react/package-lock.json +++ b/packages/react/package-lock.json @@ -1,17 +1,17 @@ { "name": "@ionic/react", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/react", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT", "dependencies": { - "@ionic/core": "^9.0.12", + "@ionic/core": "^9.0.13", "@stencil/react-output-target": "^1.7.0", - "ionicons": "^8.0.13", + "ionicons": "^8.1.1", "tslib": "*" }, "devDependencies": { @@ -891,13 +891,13 @@ } }, "node_modules/@ionic/core": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.12.tgz", - "integrity": "sha512-rq2yIoEBx9WQsm2xWfi8b61u0jBTuhKkFi4A5BOV5el477AWQoCSLkEU0mUEapZMf+SpBI+sj9VAqiN3aQkCGw==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.13.tgz", + "integrity": "sha512-0/f/QiSwuKZfEiNzXImm6lYs+a4KX2qaM90Nm+0/nno+mbM8Uh9wtbINEpo09wgdaK10kjGvmnNg+2F8bPmdFQ==", "license": "MIT", "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "engines": { @@ -1903,9 +1903,9 @@ } }, "node_modules/@stencil/core": { - "version": "4.45.4", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.4.tgz", - "integrity": "sha512-MkGop5DULDFAorpI4/zeEqmU9KRuUaqrjprMrEdpqGXhWQ8Lkk4jqQF+lJtOa3BjPrv8j7Ux2hu6vpd4vJJUvw==", + "version": "4.45.5", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.5.tgz", + "integrity": "sha512-tz6h9MI/s0WwNsfGbSguo9+xnerWam8NI8/U3VUS9MNMviTYyg3Ymz5XniSM9PGFnbd2xhhmyJhHHaFmy9mYog==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -5225,9 +5225,9 @@ } }, "node_modules/ionicons": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.0.tgz", - "integrity": "sha512-XSM2gYWTXxSYTwjmKWAoy4yR7AbAFDjpc5ZIivAiGXskM0fe5CdMPfs6InQRUcrYtVb2WZ/0HQ1/jeh3JW78SA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.1.tgz", + "integrity": "sha512-VJjbZjjyzFmI0MAtlUKRprLpD4MbGbwcijk2aduu/a3jhGhlSUC/tQ2wM3p0/SF44/oDFdl0bdZMya3rZxnoyg==", "license": "MIT", "dependencies": { "@stencil/core": "^4.43.5" diff --git a/packages/react/package.json b/packages/react/package.json index f8ae29f794e..4a056d65c05 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react", - "version": "9.0.12", + "version": "9.0.13", "description": "React specific wrapper for @ionic/core", "keywords": [ "ionic", @@ -41,9 +41,9 @@ "css/" ], "dependencies": { - "@ionic/core": "^9.0.12", + "@ionic/core": "^9.0.13", "@stencil/react-output-target": "^1.7.0", - "ionicons": "^8.0.13", + "ionicons": "^8.1.1", "tslib": "*" }, "peerDependencies": { diff --git a/packages/vue-router/CHANGELOG.md b/packages/vue-router/CHANGELOG.md index 9789f623b79..214097860d1 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. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +**Note:** Version bump only for package @ionic/vue-router + + + + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) **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 49e74e127ad..be4a717271a 100644 --- a/packages/vue-router/package-lock.json +++ b/packages/vue-router/package-lock.json @@ -1,15 +1,15 @@ { "name": "@ionic/vue-router", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/vue-router", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT", "dependencies": { - "@ionic/vue": "^9.0.12" + "@ionic/vue": "^9.0.13" }, "devDependencies": { "@eslint/eslintrc": "^3.3.1", @@ -342,13 +342,13 @@ } }, "node_modules/@ionic/core": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.12.tgz", - "integrity": "sha512-rq2yIoEBx9WQsm2xWfi8b61u0jBTuhKkFi4A5BOV5el477AWQoCSLkEU0mUEapZMf+SpBI+sj9VAqiN3aQkCGw==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.13.tgz", + "integrity": "sha512-0/f/QiSwuKZfEiNzXImm6lYs+a4KX2qaM90Nm+0/nno+mbM8Uh9wtbINEpo09wgdaK10kjGvmnNg+2F8bPmdFQ==", "license": "MIT", "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "engines": { @@ -382,14 +382,14 @@ } }, "node_modules/@ionic/vue": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-9.0.12.tgz", - "integrity": "sha512-NN7OxLjYwo0EcRTDC45ovuQEiPQwJLkXY8U6sbatLB5yP0eNzM5C/QszAQayZ3+QCs9V3PUZB3QOk0FxKJAg8g==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-9.0.13.tgz", + "integrity": "sha512-kKDzv1ulXuAkHwWs16FhxpbMsbxE+iSCwNAaaCZEpNPm88APAOqVeM9569g3tVdUKG+3qcZWxyz2JaYwjVQUwA==", "license": "MIT", "dependencies": { - "@ionic/core": "9.0.12", + "@ionic/core": "9.0.13", "@stencil/vue-output-target": "0.14.7", - "ionicons": "^8.0.13" + "ionicons": "^8.1.1" } }, "node_modules/@jridgewell/gen-mapping": { @@ -824,9 +824,9 @@ "license": "MIT" }, "node_modules/@stencil/core": { - "version": "4.45.4", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.4.tgz", - "integrity": "sha512-MkGop5DULDFAorpI4/zeEqmU9KRuUaqrjprMrEdpqGXhWQ8Lkk4jqQF+lJtOa3BjPrv8j7Ux2hu6vpd4vJJUvw==", + "version": "4.45.5", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.5.tgz", + "integrity": "sha512-tz6h9MI/s0WwNsfGbSguo9+xnerWam8NI8/U3VUS9MNMviTYyg3Ymz5XniSM9PGFnbd2xhhmyJhHHaFmy9mYog==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -2916,9 +2916,9 @@ } }, "node_modules/ionicons": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.0.tgz", - "integrity": "sha512-XSM2gYWTXxSYTwjmKWAoy4yR7AbAFDjpc5ZIivAiGXskM0fe5CdMPfs6InQRUcrYtVb2WZ/0HQ1/jeh3JW78SA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.1.tgz", + "integrity": "sha512-VJjbZjjyzFmI0MAtlUKRprLpD4MbGbwcijk2aduu/a3jhGhlSUC/tQ2wM3p0/SF44/oDFdl0bdZMya3rZxnoyg==", "license": "MIT", "dependencies": { "@stencil/core": "^4.43.5" diff --git a/packages/vue-router/package.json b/packages/vue-router/package.json index 57e98b3c505..30dbf1b359e 100644 --- a/packages/vue-router/package.json +++ b/packages/vue-router/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/vue-router", - "version": "9.0.12", + "version": "9.0.13", "description": "Vue Router integration for @ionic/vue", "scripts": { "eslint": "eslint src", @@ -44,7 +44,7 @@ }, "homepage": "https://github.com/ionic-team/ionic-framework#readme", "dependencies": { - "@ionic/vue": "^9.0.12" + "@ionic/vue": "^9.0.13" }, "devDependencies": { "@eslint/eslintrc": "^3.3.1", diff --git a/packages/vue/CHANGELOG.md b/packages/vue/CHANGELOG.md index cc9cf154203..070b666bb07 100644 --- a/packages/vue/CHANGELOG.md +++ b/packages/vue/CHANGELOG.md @@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [9.0.13](https://github.com/ionic-team/ionic-framework/compare/v9.0.12...v9.0.13) (2026-11-20) + +### Bug Fixes + +* **deps:** update ionicons to v8.1.1 for svg sanitization fix ([#31790](https://github.com/ionic-team/ionic-framework/issues/31790)) ([2040b22](https://github.com/ionic-team/ionic-framework/commit/2040b22afd8a8236ebe6444ef52db88ffcff2118)), closes [#31789](https://github.com/ionic-team/ionic-framework/issues/31789) + + ## [9.0.12](https://github.com/ionic-team/ionic-framework/compare/v9.0.11...v9.0.12) (2026-11-17) **Note:** Version bump only for package @ionic/vue diff --git a/packages/vue/package-lock.json b/packages/vue/package-lock.json index 4d522c43d4e..3a5a277df76 100644 --- a/packages/vue/package-lock.json +++ b/packages/vue/package-lock.json @@ -1,17 +1,17 @@ { "name": "@ionic/vue", - "version": "9.0.12", + "version": "9.0.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@ionic/vue", - "version": "9.0.12", + "version": "9.0.13", "license": "MIT", "dependencies": { - "@ionic/core": "^9.0.12", + "@ionic/core": "^9.0.13", "@stencil/vue-output-target": "0.14.7", - "ionicons": "^8.0.13" + "ionicons": "^8.1.1" }, "devDependencies": { "@eslint/eslintrc": "^3.3.1", @@ -346,13 +346,13 @@ } }, "node_modules/@ionic/core": { - "version": "9.0.12", - "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.12.tgz", - "integrity": "sha512-rq2yIoEBx9WQsm2xWfi8b61u0jBTuhKkFi4A5BOV5el477AWQoCSLkEU0mUEapZMf+SpBI+sj9VAqiN3aQkCGw==", + "version": "9.0.13", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-9.0.13.tgz", + "integrity": "sha512-0/f/QiSwuKZfEiNzXImm6lYs+a4KX2qaM90Nm+0/nno+mbM8Uh9wtbINEpo09wgdaK10kjGvmnNg+2F8bPmdFQ==", "license": "MIT", "dependencies": { - "@stencil/core": "^4.45.4", - "ionicons": "^8.1.0", + "@stencil/core": "^4.45.5", + "ionicons": "^8.1.1", "tslib": "^2.1.0" }, "engines": { @@ -889,9 +889,9 @@ "license": "MIT" }, "node_modules/@stencil/core": { - "version": "4.45.4", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.4.tgz", - "integrity": "sha512-MkGop5DULDFAorpI4/zeEqmU9KRuUaqrjprMrEdpqGXhWQ8Lkk4jqQF+lJtOa3BjPrv8j7Ux2hu6vpd4vJJUvw==", + "version": "4.45.5", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.45.5.tgz", + "integrity": "sha512-tz6h9MI/s0WwNsfGbSguo9+xnerWam8NI8/U3VUS9MNMviTYyg3Ymz5XniSM9PGFnbd2xhhmyJhHHaFmy9mYog==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -3089,9 +3089,9 @@ } }, "node_modules/ionicons": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.0.tgz", - "integrity": "sha512-XSM2gYWTXxSYTwjmKWAoy4yR7AbAFDjpc5ZIivAiGXskM0fe5CdMPfs6InQRUcrYtVb2WZ/0HQ1/jeh3JW78SA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-8.1.1.tgz", + "integrity": "sha512-VJjbZjjyzFmI0MAtlUKRprLpD4MbGbwcijk2aduu/a3jhGhlSUC/tQ2wM3p0/SF44/oDFdl0bdZMya3rZxnoyg==", "license": "MIT", "dependencies": { "@stencil/core": "^4.43.5" diff --git a/packages/vue/package.json b/packages/vue/package.json index 19f9e91a621..8892e1bc2a2 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/vue", - "version": "9.0.12", + "version": "9.0.13", "description": "Vue specific wrapper for @ionic/core", "scripts": { "eslint": "eslint src", @@ -78,9 +78,9 @@ } }, "dependencies": { - "@ionic/core": "^9.0.12", + "@ionic/core": "^9.0.13", "@stencil/vue-output-target": "0.14.7", - "ionicons": "^8.0.13" + "ionicons": "^8.1.1" }, "vetur": { "tags": "dist/vetur/tags.json",