mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(select): do not close popover or set value when switching with arrow keys (#22210)
fixes #22179
This commit is contained in:
@@ -97,6 +97,8 @@ export class RadioGroup implements ComponentInterface {
|
||||
|
||||
@Listen('keydown', { target: 'document' })
|
||||
onKeydown(ev: any) {
|
||||
const inSelectPopover = !!this.el.closest('ion-select-popover');
|
||||
|
||||
if (ev.target && !this.el.contains(ev.target)) {
|
||||
return;
|
||||
}
|
||||
@@ -129,7 +131,10 @@ export class RadioGroup implements ComponentInterface {
|
||||
|
||||
if (next && radios.includes(next)) {
|
||||
next.setFocus();
|
||||
this.value = next.value;
|
||||
|
||||
if (!inSelectPopover) {
|
||||
this.value = next.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user