Skip to content

Commit 5317672

Browse files
committed
refactor(overlays): update addWrites
1 parent 1636989 commit 5317672

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

core/src/utils/overlays.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -752,19 +752,21 @@ const overlayAnimation = async (
752752
animation.duration(0);
753753
}
754754

755-
aniRoot.setAttribute('aria-hidden', 'true');
755+
animation.beforeAddWrite(() => {
756+
console.log('beforeAddWrite');
757+
aniRoot.setAttribute('aria-hidden', 'true');
756758

757-
if (overlay.keyboardClose) {
758-
animation.beforeAddWrite(() => {
759+
if (overlay.keyboardClose) {
759760
const activeElement = baseEl.ownerDocument!.activeElement as HTMLElement;
760761
if (activeElement?.matches('input,ion-input, ion-textarea')) {
761762
activeElement.blur();
762763
}
763-
});
764-
}
764+
}
765+
});
765766

766767
animation.afterAddWrite(() => {
767768
aniRoot.removeAttribute('aria-hidden');
769+
console.log('afterAddWrite');
768770
});
769771

770772
const activeAni = activeAnimations.get(overlay) || [];

0 commit comments

Comments
 (0)