File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -520,10 +520,9 @@ export const present = async <OverlayPresentOptions>(
520520 */
521521 if ( overlay . el . tagName !== 'ION-TOAST' ) {
522522 setRootAriaHidden ( true ) ;
523+ document . body . classList . add ( BACKDROP_NO_SCROLL ) ;
523524 }
524525
525- document . body . classList . add ( BACKDROP_NO_SCROLL ) ;
526-
527526 hideUnderlyingOverlaysFromScreenReaders ( overlay . el ) ;
528527 hideAnimatingOverlayFromScreenReaders ( overlay . el ) ;
529528
@@ -648,8 +647,6 @@ export const dismiss = async <OverlayDismissOptions>(
648647
649648 const presentedOverlays = doc !== undefined ? getPresentedOverlays ( doc ) : [ ] ;
650649
651- const isLastOverlay = presentedOverlays . length === 1 ;
652-
653650 /**
654651 * For accessibility, toasts lack focus traps and don’t receive
655652 * `aria-hidden` on the root element when presented.
@@ -671,9 +668,6 @@ export const dismiss = async <OverlayDismissOptions>(
671668 */
672669 if ( lastOverlayNotToast ) {
673670 setRootAriaHidden ( false ) ;
674- }
675-
676- if ( isLastOverlay ) {
677671 document . body . classList . remove ( BACKDROP_NO_SCROLL ) ;
678672 }
679673
You can’t perform that action at this time.
0 commit comments