Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable back-button on modals #1397

Closed
LeleDev opened this issue May 15, 2014 · 8 comments
Closed

Disable back-button on modals #1397

LeleDev opened this issue May 15, 2014 · 8 comments

Comments

@LeleDev
Copy link

LeleDev commented May 15, 2014

I'm using $ionicModal to show a sign in page

This should trap the user in the modal itself, but the back button allow him to "escape" easily from that view. Could you please add a modal property to prevent the modal from being hidden when the user hits the back button on android?

Thank you in advance!

@LeleDev LeleDev changed the title Disable back button on modals Disable back-button on modals May 15, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Jun 4, 2014

Good idea.

@ajoslin ajoslin closed this as completed in 9ffca1e Jun 4, 2014
@ajoslin
Copy link
Contributor

ajoslin commented Jun 4, 2014

Added

@LeleDev
Copy link
Author

LeleDev commented Jun 5, 2014

Great, thank you!

Just a question: is it an intended behaviour that hardwareBackButtonClose: false now makes the app close on button press instead of doing nothing? (I ask even if in my case it's exactly what I need ;) )

@ajoslin
Copy link
Contributor

ajoslin commented Jun 5, 2014

Hmm, you are right, it should actually do nothing instead of causing whatever is under the modal to go back.

@ajoslin
Copy link
Contributor

ajoslin commented Jun 5, 2014

Fixed. Thanks for testing!

@LeleDev
Copy link
Author

LeleDev commented Jun 10, 2014

There seems to be another issue... the backbutton keeps being disabled also after that the modal has been hidden!

@boltex
Copy link

boltex commented Nov 6, 2017

Like @LeleDev said, sometimes the back button stays disabled for the whole application even if the modal was hiden ! (not 100% of the time I cannot find a way to reproduce reliably but it does happen!)

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants