Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/assign-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
issues: write
steps:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@af6beea6bdf1e8eb373f061c5bc168681fc6d011 # v4.0.1
uses: pozil/auto-assign-issue@d6e511896e5f1d2408e74db74416647d8ff80c8c # v4.1.0
with:
assignees: brandyscarney, thetaPC, ShaneK
numOfAssignee: 1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
- uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: javascript
- uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0
- uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [9.0.10](https://github.com/ionic-team/ionic-framework/compare/v9.0.9...v9.0.10) (2026-10-28)

### Bug Fixes

* **alert:** only block Enter on checkbox inputs, not the whole document ([#31643](https://github.com/ionic-team/ionic-framework/issues/31643)) ([28d2940](https://github.com/ionic-team/ionic-framework/commit/28d294035a6de45e797467d9aaca83b95d3baf4a)), closes [#30811](https://github.com/ionic-team/ionic-framework/issues/30811)
* **menu:** allow menus inside split pane main content to open ([#31586](https://github.com/ionic-team/ionic-framework/issues/31586)) ([3eebee3](https://github.com/ionic-team/ionic-framework/commit/3eebee37bd13f52fc7d87cb468986d16138acf40)), closes [#30591](https://github.com/ionic-team/ionic-framework/issues/30591) [#28801](https://github.com/ionic-team/ionic-framework/issues/28801)
* **rtl:** respect `dir` of ancestor elements throughout components ([#31459](https://github.com/ionic-team/ionic-framework/issues/31459)) ([25a114f](https://github.com/ionic-team/ionic-framework/commit/25a114f4077cae0aa2d633e32d26638096eeb9f1))
* **vue:** render resolved href for object router-link ([#31663](https://github.com/ionic-team/ionic-framework/issues/31663)) ([d73cacb](https://github.com/ionic-team/ionic-framework/commit/d73cacbc5891aa982b078f8e3554a5e14a8fb1bb)), closes [#30848](https://github.com/ionic-team/ionic-framework/issues/30848)


## [9.0.9](https://github.com/ionic-team/ionic-framework/compare/v9.0.8...v9.0.9) (2026-10-21)

### Bug Fixes
Expand Down
10 changes: 10 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [9.0.10](https://github.com/ionic-team/ionic-framework/compare/v9.0.9...v9.0.10) (2026-10-28)

### Bug Fixes

* **alert:** only block Enter on checkbox inputs, not the whole document ([#31643](https://github.com/ionic-team/ionic-framework/issues/31643)) ([28d2940](https://github.com/ionic-team/ionic-framework/commit/28d294035a6de45e797467d9aaca83b95d3baf4a)), closes [#30811](https://github.com/ionic-team/ionic-framework/issues/30811)
* **menu:** allow menus inside split pane main content to open ([#31586](https://github.com/ionic-team/ionic-framework/issues/31586)) ([3eebee3](https://github.com/ionic-team/ionic-framework/commit/3eebee37bd13f52fc7d87cb468986d16138acf40)), closes [#30591](https://github.com/ionic-team/ionic-framework/issues/30591) [#28801](https://github.com/ionic-team/ionic-framework/issues/28801)
* **rtl:** respect `dir` of ancestor elements throughout components ([#31459](https://github.com/ionic-team/ionic-framework/issues/31459)) ([25a114f](https://github.com/ionic-team/ionic-framework/commit/25a114f4077cae0aa2d633e32d26638096eeb9f1))
* **vue:** render resolved href for object router-link ([#31663](https://github.com/ionic-team/ionic-framework/issues/31663)) ([d73cacb](https://github.com/ionic-team/ionic-framework/commit/d73cacbc5891aa982b078f8e3554a5e14a8fb1bb)), closes [#30848](https://github.com/ionic-team/ionic-framework/issues/30848)


## [9.0.9](https://github.com/ionic-team/ionic-framework/compare/v9.0.8...v9.0.9) (2026-10-21)

### Bug Fixes
Expand Down
12 changes: 6 additions & 6 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "9.0.9",
"version": "9.0.10",
"description": "Base components for Ionic",
"engines": {
"node": ">= 16"
Expand Down Expand Up @@ -86,7 +86,7 @@
"@stencil/angular-output-target": "^1.4.1",
"@stencil/react-output-target": "^1.6.2",
"@stencil/sass": "^3.0.9",
"@stencil/vue-output-target": "0.14.6",
"@stencil/vue-output-target": "0.14.7",
"@types/jest": "^29.5.6",
"@types/node": "^24.13.3",
"@typescript-eslint/eslint-plugin": "^8.0.0",
Expand Down
19 changes: 10 additions & 9 deletions core/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,6 @@ export class Alert implements ComponentInterface, OverlayInterface {
onKeydown(ev: any) {
const inputTypes = new Set(this.processedInputs.map((i) => i.type));

/**
* Based on keyboard navigation requirements, the
* checkbox should not respond to the enter keydown event.
*/
if (inputTypes.has('checkbox') && ev.key === 'Enter') {
ev.preventDefault();
return;
}

/**
* Ensure when alert container is being focused, and the user presses the tab + shift keys, the focus will be set to the last alert button.
*/
Expand Down Expand Up @@ -525,6 +516,15 @@ export class Alert implements ComponentInterface, OverlayInterface {
forceUpdate(this);
}

/**
* Prevent Enter from toggling the checkbox, which only Space should do.
*/
private onCheckboxKeydown = (ev: KeyboardEvent) => {
if (ev.key === 'Enter') {
ev.preventDefault();
}
};

private async buttonClick(button: AlertButton) {
const role = button.role;
const values = this.getValues();
Expand Down Expand Up @@ -625,6 +625,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
<button
type="button"
onClick={() => this.cbClick(i)}
onKeyDown={this.onCheckboxKeydown}
aria-checked={`${i.checked}`}
id={i.id}
disabled={i.disabled}
Expand Down
63 changes: 63 additions & 0 deletions core/src/components/alert/test/a11y/alert.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,69 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
});
});

/**
* This behavior does not vary across modes/directions
*/
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('alert: Enter key with checkbox inputs'), () => {
test('should not block Enter in elements outside of the alert', async ({ page }, testInfo) => {
testInfo.annotations.push({
type: 'issue',
description: 'https://github.com/ionic-team/ionic-framework/issues/30811',
});

await page.setContent(
`
<textarea></textarea>
<ion-alert header="Alert"></ion-alert>

<script>
const alert = document.querySelector('ion-alert');
alert.inputs = [{ type: 'checkbox', label: 'Checkbox', value: 'checkbox' }];
</script>
`,
config
);

// The alert isn't presented since it would trap focus away from the textarea
const textarea = page.locator('textarea');
await textarea.click();
await textarea.press('a');
await textarea.press('Enter');
await textarea.press('b');

await expect(textarea).toHaveValue('a\nb');
});

test('should dismiss the alert when pressing Enter on a button', async ({ page }) => {
await page.setContent(
`
<ion-alert header="Alert"></ion-alert>

<script>
const alert = document.querySelector('ion-alert');
alert.inputs = [{ type: 'checkbox', label: 'Checkbox', value: 'checkbox' }];
alert.buttons = ['OK'];
</script>
`,
config
);

const ionAlertDidPresent = await page.spyOnEvent('ionAlertDidPresent');
const ionAlertDidDismiss = await page.spyOnEvent('ionAlertDidDismiss');
const alert = page.locator('ion-alert');

await alert.evaluate((el: HTMLIonAlertElement) => el.present());
await ionAlertDidPresent.next();

await alert.locator('.alert-button').press('Enter');
await ionAlertDidDismiss.next();

await expect(alert).toBeHidden();
});
});
});

/**
* This behavior does not vary across directions
*/
Expand Down
25 changes: 14 additions & 11 deletions core/src/components/col/col.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ComponentInterface } from '@stencil/core';
import { Component, Host, Listen, Prop, forceUpdate, h } from '@stencil/core';
import { Component, Element, Host, Listen, Prop, forceUpdate, h } from '@stencil/core';
import { matchBreakpoint } from '@utils/media';
import { isRTL } from '@utils/rtl';

import { getIonMode } from '../../global/ionic-global';

Expand All @@ -15,6 +16,8 @@ const BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl'];
shadow: true,
})
export class Col implements ComponentInterface {
@Element() el!: HTMLElement;

/**
* The amount to offset the column, in terms of how many columns it should shift to the end
* of the total available.
Expand Down Expand Up @@ -235,30 +238,30 @@ export class Col implements ComponentInterface {
};
}

private calculateOffset(isRTL: boolean) {
return this.calculatePosition('offset', isRTL ? 'margin-right' : 'margin-left');
private calculateOffset(rtl: boolean) {
return this.calculatePosition('offset', rtl ? 'margin-right' : 'margin-left');
}

private calculatePull(isRTL: boolean) {
return this.calculatePosition('pull', isRTL ? 'left' : 'right');
private calculatePull(rtl: boolean) {
return this.calculatePosition('pull', rtl ? 'left' : 'right');
}

private calculatePush(isRTL: boolean) {
return this.calculatePosition('push', isRTL ? 'right' : 'left');
private calculatePush(rtl: boolean) {
return this.calculatePosition('push', rtl ? 'right' : 'left');
}

render() {
const isRTL = document.dir === 'rtl';
const rtl = isRTL(this.el);
const mode = getIonMode(this);
return (
<Host
class={{
[mode]: true,
}}
style={{
...this.calculateOffset(isRTL),
...this.calculatePull(isRTL),
...this.calculatePush(isRTL),
...this.calculateOffset(rtl),
...this.calculatePull(rtl),
...this.calculatePush(rtl),
...this.calculateSize(),
}}
>
Expand Down
36 changes: 36 additions & 0 deletions core/src/components/col/test/col.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { newSpecPage } from '@stencil/core/testing';

import { Col } from '../col';

describe('ion-col: rtl', () => {
const newCol = async (html: string, documentDir?: 'rtl') => {
const page = await newSpecPage({ components: [Col], html: `<div></div>` });
if (documentDir) {
page.doc.documentElement.setAttribute('dir', documentDir);
}
await page.setContent(html);
return page.body.querySelector('ion-col')!;
};

const cols = (n: number) => `calc(calc(${n} / var(--ion-grid-columns, 12)) * 100%)`;

const COL_PARAMS = `offset="3" push="2" pull="1"`;

it('should mirror push and pull when it declares rtl', async () => {
const col = await newCol(`<ion-col dir="rtl" ${COL_PARAMS}></ion-col>`);
expect(col.style.right).toBe(cols(2));
expect(col.style.left).toBe(cols(1));
});

it('should mirror push and pull when an ancestor declares rtl', async () => {
const col = await newCol(`<div dir="rtl"><div><ion-col ${COL_PARAMS}></ion-col></div></div>`);
expect(col.style.right).toBe(cols(2));
expect(col.style.left).toBe(cols(1));
});

it('should not mirror push and pull when an ancestor declares ltr in an rtl document', async () => {
const col = await newCol(`<div dir="ltr"><div><ion-col ${COL_PARAMS}></ion-col></div></div>`, 'rtl');
expect(col.style.right).toBe(cols(1));
expect(col.style.left).toBe(cols(2));
});
});
4 changes: 2 additions & 2 deletions core/src/components/datetime/datetime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2315,8 +2315,7 @@ export class Datetime implements ComponentInterface {
const prevMonthDisabled = disabled || isPrevMonthDisabled(this.workingParts, this.minParts, this.maxParts);
const nextMonthDisabled = disabled || isNextMonthDisabled(this.workingParts, this.maxParts);

// don't use the inheritAttributes util because it removes dir from the host, and we still need that
const hostDir = this.el.getAttribute('dir') || undefined;
const hostDir = isRTL(this.el) ? 'rtl' : 'ltr';

return (
<div class="calendar-header" part="calendar-header">
Expand All @@ -2336,6 +2335,7 @@ export class Datetime implements ComponentInterface {
<span id="toggle-wrapper">
{getMonthAndYear(this.locale, this.workingParts)}
<ion-icon
dir={hostDir}
aria-hidden="true"
icon={this.showMonthAndYear ? expandedIcon : collapsedIcon}
lazy={false}
Expand Down
27 changes: 22 additions & 5 deletions core/src/components/datetime/test/basic/datetime.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,13 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
});

/**
* We are setting RTL on the component
* instead, so we don't need to test
* RTL is set in the markup, on the component
* or an ancestor, so we don't need to test
* both directions. Also, this behavior
* does not vary across modes.
*/
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('datetime: RTL set on component'), () => {
test.describe(title('datetime: RTL'), () => {
test('should flip icons when RTL is set on component directly', async ({ page }) => {
await page.setContent(
`
Expand All @@ -606,8 +606,25 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
);

const nextPrevIcons = page.locator('ion-datetime .calendar-next-prev ion-icon');
await expect(nextPrevIcons.first()).toHaveClass(/flip-rtl/);
await expect(nextPrevIcons.last()).toHaveClass(/flip-rtl/);
await expect(nextPrevIcons.first()).toHaveClass(/icon-rtl/);
await expect(nextPrevIcons.last()).toHaveClass(/icon-rtl/);
});

test('should flip icons when RTL is set on an ancestor', async ({ page }) => {
await page.setContent(
`
<div dir="rtl">
<div>
<ion-datetime></ion-datetime>
</div>
</div>
`,
config
);

const nextPrevIcons = page.locator('ion-datetime .calendar-next-prev ion-icon');
await expect(nextPrevIcons.first()).toHaveClass(/icon-rtl/);
await expect(nextPrevIcons.last()).toHaveClass(/icon-rtl/);
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/item-options/item-options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ItemOptions implements ComponentInterface {

render() {
const mode = getIonMode(this);
const isEnd = isEndSide(this.side);
const isEnd = isEndSide(this.side, this.el);
return (
<Host
class={{
Expand Down
Loading
Loading