-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Ionic 2: Confirm button with role:cancel does not fire on android back button #7824
Comments
Hi, any news on this? Anyone?? @jgw96 |
Hello, can someone from the Ionic team please reply to this? @jgw96 |
Hello, thanks for opening an issue with us! I am very sorry for the delay on this one, we have been very focused with getting the RC.0 release out. We will be looking at adding this enhancement. |
@daveshirman we are aware of this issue, and I have disabled hardware go back support for Alerts/Actionsheet, since this bug can lead to deadlocks. For example, if the alert needs to resolve a promise, the cancel handler is never called, and the promise is never resolved. Hardware Go back support has been improved a lot, now it works with modals, tabs, and nested navigation stacks. Support for Alerts is pending though |
@manucorporat Hey, is this really a good solution though? All Android apps use allow the hardware/software back button to dismiss alerts and actionsheets. Isn't this just breaking user expectation and therefore the illusion of a native app? |
@daveshirman it is not a solution, but it is better to disable a buggy feature that can lead to worst scenarios (like a frozen app). The fix for this issue is not trivial and we are about to release a new version very soon, it is too later for big changes. From a UX, you are right. But a Alert is a UI element that is asking for user interaction, an alert WANTS the user to do something, so we think disabling the hardware go back is not a big deal from an UX point of view in the meantime. |
@manucorporat Yep, totally agree. Look forward to the next release, especially navigation fixes (setRoot etc). Thanks for all your team's hard work. Loving working with this framework. |
Hello ! Any idea when this will be implemented ? |
Is this Issue solved or still open? |
This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there. If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know! Thank you for using Ionic! |
Issue moved to: ionic-team/ionic-v3#128 |
Short description of the problem:
When presenting an alert since beta 11, if the user presses the Android hardware back button, the
role: 'cancel'
handler is not fired.In previous beta versions, this was fired.
What behavior are you expecting?
For the Android back button to fire the handler with
role: 'cancel'
Steps to reproduce:
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x or 2.x
2.x
Plunker that shows an example of your issue
Sorry, but I can't show this in a plunkr as it requires the android hardware button.
Run
ionic info
from terminal/cmd prompt: (paste output below)Davids-Air:AppHazard daveshirman$ ionic info
Your system information:
Cordova CLI: 6.2.0
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.3.0
Xcode version: Xcode 7.2.1 Build version 7C1002
The text was updated successfully, but these errors were encountered: