Skip to content

bug: Return doesn't work on Modal "Card Modal" #30821

Closed as duplicate
Closed as duplicate

Description

@microSoftware

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

On android, i went to chrome ionic kitchen website. And add "icon to my homescreen".
Then i open this shortcut and it open IONIC KITCHEN like a native app.
When i go to modal and click "Open Card Modal".
The native android back button doesn't do anything. So it's misleading for user because when you click on it nothing happen.

Expected Behavior

When clicking on native android back button, it should go back to the previous page.

Steps to Reproduce

See above

Code Reproduction URL

https://docs-demo.ionic.io/

Ionic Info

/

Additional Information

On newer version of android, the modal remain visible but the back page return.
On old version of android, the back button does nothing. i can click 10 time and i will always see the modal.

Activity

  1. thetaPC commented on Oct 19, 2026

    @thetaPC
    Contributor

    Thanks for the report, and sorry for the delay.

    Verified on 9.0.8. This is the same request as #28703: in a browser or an installed PWA, Ionic only handles the Android back button when experimentalCloseWatcher is enabled in the Ionic config, and the docs demo does not enable it, so the back press does a normal history back and leaves the modal open. Use Ionic 9.0.7 or later, which also fixed back navigation once nothing is open in #31520, shipped in v9.0.7, and enable the flag in your app's Ionic config:

    // Angular
    provideIonicAngular({ experimentalCloseWatcher: true });
    
    // React
    setupIonicReact({ experimentalCloseWatcher: true });
    
    // Vue
    app.use(IonicVue, { experimentalCloseWatcher: true });
    
    // JavaScript, before Ionic loads
    window.Ionic = { config: { experimentalCloseWatcher: true } };

    Closing this as a duplicate of #28703, where the full details are.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions