mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
Merge branch 'main' into chore/update-next-from-main
This commit is contained in:
@ -2,6 +2,7 @@ import { doc } from '@utils/browser';
|
||||
import { focusFirstDescendant, focusLastDescendant, focusableQueryString } from '@utils/focus-trap';
|
||||
import type { BackButtonEvent } from '@utils/hardware-back-button';
|
||||
import { shouldUseCloseWatcher } from '@utils/hardware-back-button';
|
||||
import { printIonError, printIonWarning } from '@utils/logging';
|
||||
|
||||
import { config } from '../global/config';
|
||||
import { getIonMode } from '../global/ionic-global';
|
||||
@ -31,7 +32,6 @@ import {
|
||||
getElementRoot,
|
||||
removeEventListener,
|
||||
} from './helpers';
|
||||
import { printIonWarning } from './logging';
|
||||
import { isPlatform } from './platform';
|
||||
|
||||
let lastOverlayIndex = 0;
|
||||
@ -648,7 +648,7 @@ export const dismiss = async <OverlayDismissOptions>(
|
||||
const presentedOverlays = doc !== undefined ? getPresentedOverlays(doc) : [];
|
||||
|
||||
/**
|
||||
* For accessibility, toasts lack focus traps and don’t receive
|
||||
* For accessibility, toasts lack focus traps and don't receive
|
||||
* `aria-hidden` on the root element when presented.
|
||||
*
|
||||
* All other overlays use focus traps to keep keyboard focus
|
||||
@ -723,7 +723,7 @@ export const dismiss = async <OverlayDismissOptions>(
|
||||
overlay.el.lastFocus = undefined;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
printIonError(`[${overlay.el.tagName.toLowerCase()}] - `, err);
|
||||
}
|
||||
|
||||
overlay.el.remove();
|
||||
@ -941,7 +941,7 @@ export const createTriggerController = () => {
|
||||
const triggerEl = trigger !== undefined ? document.getElementById(trigger) : null;
|
||||
if (!triggerEl) {
|
||||
printIonWarning(
|
||||
`A trigger element with the ID "${trigger}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,
|
||||
`[${el.tagName.toLowerCase()}] - A trigger element with the ID "${trigger}" was not found in the DOM. The trigger element must be in the DOM when the "trigger" property is set on an overlay component.`,
|
||||
el
|
||||
);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user