Skip to content

Commit 26a8bc6

Browse files
authored
fix(select): focus the correct selected item
See #30480
1 parent d52b253 commit 26a8bc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/components/select/select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export class Select implements ComponentInterface {
349349
const indexOfSelected = this.childOpts.findIndex((o) => o.value === this.value);
350350
if (indexOfSelected > -1) {
351351
const selectedItem = overlay.querySelector<HTMLElement>(
352-
`.select-interface-option:nth-child(${indexOfSelected + 1})`
352+
`.select-interface-option:nth-of-type(${indexOfSelected + 1})`
353353
);
354354

355355
if (selectedItem) {

0 commit comments

Comments
 (0)