ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
127 stars 86 forks source link

loadingController not preventing hardware back button press #255

Open ionitron-bot[bot] opened 5 years ago

ionitron-bot[bot] commented 5 years ago

Original issue by @dayaki on 2017-02-17T12:22:16Z

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:

With LoadingController currently been displayed, pressing the hardware back button takes you to the previous view with the loadingController still been shown.

Expected behavior:

LoadingController should prevent any hardware back button press from working OR dismiss the loadingController when the hardware back button press takes user to the previous view.

Steps to reproduce:

Related code:

// push to a new view
this.navCtrl.push(Filter);

// Call LoadingController
let loader = this.loadingCtrl.create({
  content: "Please wait...",
  duration: 10000 // to enable it still longer on the screen.
});

loader.present();

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

Cordova CLI: 6.5.0 
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.1
ios-deploy version: 1.9.0 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v6.9.4
Xcode version: Xcode 8.2.1 Build version 8C1002
laxman-spidey commented 5 years ago

Any update on this?

anand-raj1411 commented 5 years ago

Same issue on Ionic4 also.