File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -512,8 +512,9 @@ export const present = async <OverlayPresentOptions>(
512512 if ( overlay . presented ) {
513513 return ;
514514 }
515-
515+
516516 console . log ( "presenting overlay..." ) ;
517+ ( document . activeElement as HTMLElement ) ?. blur ( ) ;
517518
518519 /**
519520 * Due to accessibility guidelines, toasts do not have
@@ -524,6 +525,7 @@ export const present = async <OverlayPresentOptions>(
524525 */
525526 if ( overlay . el . tagName !== 'ION-TOAST' ) {
526527 setRootAriaHidden ( true ) ;
528+ document . body . classList . add ( BACKDROP_NO_SCROLL ) ;
527529 }
528530
529531 hideUnderlyingOverlaysFromScreenReaders ( overlay . el ) ;
@@ -649,6 +651,8 @@ export const dismiss = async <OverlayDismissOptions>(
649651 return false ;
650652 }
651653
654+ ( document . activeElement as HTMLElement ) ?. blur ( ) ;
655+
652656 const presentedOverlays = doc !== undefined ? getPresentedOverlays ( doc ) : [ ] ;
653657
654658 /**
You can’t perform that action at this time.
0 commit comments