Closed yexinjia closed 4 years ago
Thanks for the issue. Can you provide a repo with the code required to reproduce this issue? The current behavior in Ionic Framework is to dismiss the active modals first before navigating backwards when pressing the hardware back button.
I dismiss the active modals first, but there is no effect.
Ionic Framework will take care of dismissing any active modals first, so the custom code you have written above is not needed. If you remove the custom code, does that resolve your issue?
on my phone, is no effect. Ionic Framework will take care of dismissing any but modal.
Can you provide a repo with the code required to reproduce this issue?
I wish when I click the back button do not close modal compoent, what should i do ? because there is a login page in Modal component, and my project must be to login to use.
Can you provide a repo with the code required to reproduce this issue?
I wish when I click the back button do not close modal compoent, what should i do ? because there is a login page in Modal component, and my project must be to login to use.
Thanks for the issue! This issue is being closed due to the lack of a reply. 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.
Thank you for using Ionic!
What should happen when users click over back button of phone? In case when modal opens. Registered a back button:
// To prevent interference with ionic's own backbutton handling // you can subscribe with a low priority instead this.platform.backButton.subscribe(() => { // code that is executed when the user pressed the back button // and ionic doesn't already know what to do (close modals etc...) self.modalController.dismiss(); });
The problem with the code:
This should not happen the page should not pop - only modal should close.