feat(popover): add desktop support (#23258)

resolves #21599
This commit is contained in:
Liam DeBeasi
2021-05-10 17:37:52 -04:00
committed by GitHub
parent a037b65aad
commit a67a0fabb8
30 changed files with 3526 additions and 200 deletions

View File

@ -71,7 +71,7 @@ export const createOverlay = <T extends HTMLIonOverlayElement>(tagName: string,
const focusableQueryString = '[tabindex]:not([tabindex^="-"]), input:not([type=hidden]):not([tabindex^="-"]), textarea:not([tabindex^="-"]), button:not([tabindex^="-"]), select:not([tabindex^="-"]), .ion-focusable:not([tabindex^="-"])';
const innerFocusableQueryString = 'input:not([type=hidden]), textarea, button, select';
const focusFirstDescendant = (ref: Element, overlay: HTMLIonOverlayElement) => {
export const focusFirstDescendant = (ref: Element, overlay: HTMLIonOverlayElement) => {
let firstInput = ref.querySelector(focusableQueryString) as HTMLElement | null;
const shadowRoot = firstInput && firstInput.shadowRoot;