fix(overlays): trap focus inside overlay components except toast (#21716)

fixes #21647
This commit is contained in:
Liam DeBeasi
2020-07-22 12:09:31 -04:00
committed by GitHub
parent eb592b8917
commit fff4aec6cf
15 changed files with 377 additions and 30 deletions

View File

@ -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>
);
}