bug: ion-refresher does not work when refresh completes on another page
See original GitHub issueBug Report
Ionic version:
[x] 5.1.0
Current behavior:
When you start a refresh action on page 1 and the refresh action complete while you are not on page 1, you can not start a refresh action again on page 1. This behavior happens only on android, works perfectly on ios.
Expected behavior:
You should be able to refresh again, even if the refresh action completed while you were on another page!
Steps to reproduce:
Start a new Ionic project with the 3 tabs. Place ion-refresher on tab 1 and present a toast after refresh action complete. Start a new refresh action on tab 1 and then navigate to tab 2. Wait until refresh action completes and then navigate back to tab 1. Try to refresh again.
Related code:
You can find the reproduction code at my GitHub repository.
refresh(event) {
setTimeout(() => {
this.presentToast();
event.target.complete();
}, 4000);
}
async presentToast() {
const toast = await this.toastController.create({
message: 'Refresh completed!',
duration: 2000
});
toast.present();
}
<ion-refresher slot="fixed" (ionRefresh)="refresh($event)">
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
Other information:
Ionic info:
Ionic CLI : 6.7.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.1.0
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0
Capacitor:
Capacitor CLI : 2.0.0
@capacitor/core : 2.0.0
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.13.4
OS : macOS Catalina
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Yes, everything works perfectly now!
Thanks for the issue. Can you try the following dev build and let me know if it resolves the issue?
npm i @ionic/angular@5.2.0-dev.202005071622.6e0a210