SIGN IN SIGN UP

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

0 0 0 TypeScript

fix(select): focus the correct selected item in an action sheet interface with a header (#30481)

Issue number: resolves #30480

---------

## What is the current behavior?
When using a select component with the `action-sheet` interface, a
`header`, and a default selected value, the action sheet opens with the
wrong item focused. This happens because the focus logic uses
`nth-child` to target the selected item, which incorrectly includes the
header since it is a child element. As a result, the focus is shifted
one item above the correct selection.

## What is the new behavior?
- Correctly focus the selected item when opening an `action-sheet` with
a header from a select.
- Adds e2e tests for verifying this behavior.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No

## Other information


[Preview](https://ionic-framework-git-fork-crazyserver-patch-2-ionic1.vercel.app/src/components/select/test/basic)

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
P
Pau Ferrer Ocaña committed
80a111cffac70e831eb57e827301370163ef4e2a
Parent: 7b9f306
Committed by GitHub <noreply@github.com> on 7/1/2025, 5:11:00 PM