mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
fix(overlays): trap focus inside overlay components except toast (#21716)
fixes #21647
This commit is contained in:
@ -21,6 +21,7 @@ import { iosLeaveAnimation } from './animations/ios.leave';
|
||||
})
|
||||
export class Picker implements ComponentInterface, OverlayInterface {
|
||||
private durationTimeout: any;
|
||||
lastFocus?: HTMLElement;
|
||||
|
||||
@Element() el!: HTMLIonPickerElement;
|
||||
|
||||
@ -236,7 +237,10 @@ export class Picker implements ComponentInterface, OverlayInterface {
|
||||
tappable={this.backdropDismiss}
|
||||
>
|
||||
</ion-backdrop>
|
||||
<div class="picker-wrapper" role="dialog">
|
||||
|
||||
<div tabindex="0"></div>
|
||||
|
||||
<div class="picker-wrapper ion-overlay-wrapper" role="dialog">
|
||||
<div class="picker-toolbar">
|
||||
{this.buttons.map(b => (
|
||||
<div class={buttonWrapperClass(b)}>
|
||||
@ -259,6 +263,8 @@ export class Picker implements ComponentInterface, OverlayInterface {
|
||||
<div class="picker-below-highlight"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div tabindex="0"></div>
|
||||
</Host>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user