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

bug: ion-refresher does not work when refresh completes on another page #21220

Closed
NickSklA opened this issue May 6, 2020 · 6 comments · Fixed by #21236
Closed

bug: ion-refresher does not work when refresh completes on another page #21220

NickSklA opened this issue May 6, 2020 · 6 comments · Fixed by #21236
Labels
package: core @ionic/core package type: bug a confirmed bug report
Milestone

Comments

@NickSklA
Copy link

NickSklA commented May 6, 2020

Bug 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
@ionitron-bot ionitron-bot bot added the triage label May 6, 2020
@liamdebeasi liamdebeasi added the ionitron: needs reproduction a code reproduction is needed from the issue author label May 6, 2020
@ionitron-bot
Copy link

ionitron-bot bot commented May 6, 2020

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please provide a reproduction with the minimum amount of code required to reproduce the issue. Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

For a guide on how to create a good reproduction, see our Contributing Guide.

@ionitron-bot ionitron-bot bot removed the triage label May 6, 2020
@NickSklA
Copy link
Author

NickSklA commented May 6, 2020

You can find the reproduction code at my GitHub repository.

@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report and removed ionitron: needs reproduction a code reproduction is needed from the issue author labels May 7, 2020
@liamdebeasi liamdebeasi added this to the 5.1.1 milestone May 7, 2020
@liamdebeasi
Copy link
Contributor

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

@NickSklA
Copy link
Author

NickSklA commented May 7, 2020

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

Yes, everything works perfectly now!

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #21236, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Jun 10, 2020

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 Jun 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants