Skip to content

bug: sheet modals can't skip focus-traps on child routes #30700

Closed

Description

@kumibrr

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

Background content in sheet modals is not interactive if the sheet modal is in a child route.

Expected Behavior

Background content in sheet modals should be interactive if the sheet modal is in a child route.

Steps to Reproduce

  1. Install an Ionic Angular project
  2. Create a child route.
  3. Add a sheet modal according to the documentation to the child route.
  4. Add RouterOutlet to parent
  5. Add clickable items on the parent route.
  6. Try to press the buttons that are behind the sheet modal.

Code Reproduction URL

https://stackblitz.com/edit/mqtw8e1i?file=src%2Fapp%2Froutes%2Fmodal.component.ts
https://stackblitz.com/edit/cst7dxnw-nv2jzmi5?file=src%2FPage1.tsx

Ionic Info

Ionic:
Ionic CLI: 7.2.1
Ionic Framework: @ionic/angular 8.7.5
@angular-devkit/build-angular: not installed
@angular-devkit/schematics: not installed
@angular/cli: 20.3.3
@ionic/angular-toolkit: 12.3.0
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS: v20.18.1
npm: 10.8.2
OS: macOS Unknown

Additional Information

Related issues: #30684 #30040

Activity

  1. kumibrr commented on Sep 29, 2025

    @kumibrr
    ContributorAuthor

    @ShaneK Hi! I've mentioned you since you addressed #30684.

    I couldn't comment on the other issue, that's why I opened this one.

  2. added
    type: bug
    on Oct 2, 2025
  3. ShaneK commented on Dec 5, 2025

    @ShaneK
    Member

    Fun thing about your reproductions, they actually had two different issues to solve (described in the PR)! Either way, my PR should address both of them.

    Current dev build, if you'd like to try:

    8.7.12-dev.11764961567.138743ff
    
  4. kumibrr commented on Dec 5, 2025

    @kumibrr
    ContributorAuthor

    @ShaneK Love to hear that! I guess I'm hitting ionic hard enough to break it!

    I've tried 8.7.12-dev.11764961567.138743ff build on my project and it's solved partially.
    On initial load works perfectly, but if I navigate to the child route afterwards, the backdrop will stop being interactive

  5. ShaneK commented on Dec 5, 2025

    @ShaneK
    Member

    @ShaneK Love to hear that! I guess I'm hitting ionic hard enough to break it!

    I've tried 8.7.12-dev.11764961567.138743ff build on my project and it's solved partially. On initial load works perfectly, but if I navigate to the child route afterwards, the backdrop will stop being interactive

    Sorry, can you provide more information on how to reproduce this? I seem unable to

  6. kumibrr commented on Dec 6, 2025

    @kumibrr
    ContributorAuthor

    @ShaneK Okay, the issue is fixed with ion-router-outlet, but still happens when using angular's router-outlet. I was using it in my project to enable the viewTransitionsApi between child route transitions.

    Here i'll drop the updated stackblitz with the reproduction
    https://stackblitz.com/edit/mqtw8e1i-brtmsuq5?file=src%2Fapp%2Fexample.component.ts

  7. ShaneK commented on Dec 7, 2025

    @ShaneK
    Member

    @ShaneK Okay, the issue is fixed with ion-router-outlet, but still happens when using angular's router-outlet. I was using it in my project to enable the viewTransitionsApi between child route transitions.

    Here i'll drop the updated stackblitz with the reproduction https://stackblitz.com/edit/mqtw8e1i-brtmsuq5?file=src%2Fapp%2Fexample.component.ts

    Hey @kumibrr ! Could you try my latest dev build? I accidentally left out the refreshing state that's often required for Angular because of how it uses data bindings.

    New build:

    8.7.12-dev.11765060985.14ad27fb
    
  8. kumibrr commented on Dec 8, 2025

    @kumibrr
    ContributorAuthor

    @ShaneK It's working flawlessly with the latest build! 🎉
    Thank you so much for your work! 🚀

  9. added a commit that references this issue on Dec 10, 2025
    b9e3cf0
  10. ShaneK commented on Dec 10, 2025

    @ShaneK
    Member

    Hey! This has been deployed in v8.7.12

  11. ionitron-bot commented on Jan 9, 2026

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  12. locked and limited conversation to collaborators on Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug

    Type

    Fields

    Stage

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions