Skip to content

Pressing device back button instantly closes app when navigator’s page stack count > 1 and there is toast displayed using ons.notification.toast() #2388

@icaru12

Description

@icaru12

Environment

Onsen UI Version:

  • 2.9.2

Framework:

  • None

Framework binding:

  • None

Additional libraries:

  • None

Platform:

  • Android 7.0 Cordova, Windows 10 Chrome

Encountered problem

Pressing device back button or ESC instantly closes app when navigator’s page stack count > 1 and there is toast displayed using ons.notification.toast().

Expected: Pop the current page from the navigator's page stack instead of closing the app.

How to reproduce

  1. Open Chrome on desktop.
  2. Go to the Onsen UI Playground and choose the Vanilla JS Kitchensink Example.
  3. Find ons.notification.toast in the HTML editor and remove the timeout property, then click Run.
  4. Open browser JS console.
  5. In the Preview, go to Dialogs and click the "Toast" button.
  6. Press ESC, "Could not close the app..." message appears in console. In a real device when we press device back button, the app closes instantly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions