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
hardware back button doesn't dismiss ActionSheet overlay #10168
Comments
Thanks for opening an issue with us! We will look into this! (: |
I can confirm that this is how native android works. |
yes, I disabled this feature, because the way it was implemented was kind of buggy. It is in my roadmap to refactor it |
This is NOT how native Android works. It was a deliberate decision mentioned in a recent release to disable the back button for ActionSheet and overlays, waiting for refactoring. |
Sorry @daveshirman , i meant that i can confirm that on native android you can close the actionsheet with the back button |
@jgw96 Sorry, my bad! We're all good. |
Also, It would be nice to get the control of the pop up which are initiated from html, so that we can dismiss them programatically. |
Can you disable completly the back button on all pages of the application ? |
@davidgennaoui Yes, you can disable backbutton action entirely. //app.component.ts ngOnDestroy() { |
@jgw96 this is also an issue on Alerts |
Hi, So is this going to be fixed? |
@manucorporat Just created a simple fix for overlays, like alerts, popover, etc.. |
Looking forward to seeing this fixed. User experience is a little dodgy due to this. |
This fix work for me: import { IonicApp } from 'ionic-angular'; closeModals(){
} It helps me to close datetimes, bottonsheet, dialogs and other modals |
Thanks @PabloJC |
I have created in AppComponent a function that makes me logout in the app when time expires. At that moment I call the closeModals function. For example: this.logoutTimeout = setTimeout(() => {
|
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#169 |
Ionic version: (check one with "x")
[ ] 1.x
[x] 2.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
The hardware back button doesn't dismiss an ActionSheet on Android.
Expected behavior:
Tapping the hardware back button while an ActionSheet is currently visible would dismiss the ActionSheet.
Steps to reproduce:
Related code:
Quick and dirty fix is:
Other information:
Ionic info: (run
ionic info
from a terminal/cmd prompt and paste output below):The text was updated successfully, but these errors were encountered: