mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(overlays): focus overlay when presented (#20997)
fixes #19882, fixes #17126
This commit is contained in:
@@ -202,6 +202,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
||||
<Host
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
tabindex="-1"
|
||||
style={{
|
||||
zIndex: `${20000 + this.overlayIndex}`,
|
||||
}}
|
||||
|
||||
@@ -467,6 +467,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
|
||||
<Host
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
tabindex="-1"
|
||||
style={{
|
||||
zIndex: `${20000 + overlayIndex}`,
|
||||
}}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import { alertController } from '../../../../dist/ionic/index.esm.js';
|
||||
window.alertController = alertController;
|
||||
</script>
|
||||
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
|
||||
|
||||
@@ -184,6 +184,7 @@ export class Loading implements ComponentInterface, OverlayInterface {
|
||||
return (
|
||||
<Host
|
||||
onIonBackdropTap={this.onBackdropTap}
|
||||
tabindex="-1"
|
||||
style={{
|
||||
zIndex: `${40000 + this.overlayIndex}`
|
||||
}}
|
||||
|
||||
@@ -270,6 +270,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
|
||||
<Host
|
||||
no-router
|
||||
aria-modal="true"
|
||||
tabindex="-1"
|
||||
class={{
|
||||
[mode]: true,
|
||||
[`modal-card`]: this.presentingElement !== undefined && mode === 'ios',
|
||||
|
||||
@@ -216,6 +216,7 @@ export class Picker implements ComponentInterface, OverlayInterface {
|
||||
return (
|
||||
<Host
|
||||
aria-modal="true"
|
||||
tabindex="-1"
|
||||
class={{
|
||||
[mode]: true,
|
||||
|
||||
|
||||
@@ -202,6 +202,7 @@ export class Popover implements ComponentInterface, OverlayInterface {
|
||||
<Host
|
||||
aria-modal="true"
|
||||
no-router
|
||||
tabindex="-1"
|
||||
style={{
|
||||
zIndex: `${20000 + this.overlayIndex}`,
|
||||
}}
|
||||
|
||||
@@ -272,6 +272,7 @@ export class Toast implements ComponentInterface, OverlayInterface {
|
||||
...getClassMap(this.cssClass),
|
||||
'toast-translucent': this.translucent
|
||||
}}
|
||||
tabindex="-1"
|
||||
onIonToastWillDismiss={this.dispatchCancelHandler}
|
||||
>
|
||||
<div class={wrapperClass}>
|
||||
|
||||
Reference in New Issue
Block a user