bug: Ion-refresher triggers refresh when "pulling up" to scroll list after first attempt at refreshing "pull down"
See original GitHub issueBug Report
Ionic version:
4.1.0
Current behavior: The refresher trigger’s it’s “ionRefresh” method when pulling up (scrolling down). This issue occurs only after first attempt at normal pull down to refresh and it concerns only the lower part of the screen.
Expected behavior: The refresher is supposed to triggers it’s “ionRefresh” method only when pulling down + respecting the pullMin+pullMax. It is not supposed to trigger refresh when pull up (scrolling down).
Steps to reproduce: (Can be reproduced from the web app, just activate the mobile view on chrome - can be tricky)
- Pull down for the first attempt of refreshing (it works)
- Pull up (trying to scroll down) from the lower part of the screen (the upper part seems to be not willing to reproduce the issue, i could be wrong)
- You can try to pull up multiple times, it will kinda always trigger your refresh method.
Related code:
<ion-content>
<ion-refresher pullMin="65" class="refresher" slot="fixed" (ionStart)="log($event)" (ionPull)="log($event)" (ionRefresh)="doRefresh($event)">
<ion-refresher-content pullingIcon="arrow-dropdown" pullingText="Pull to refresh" refreshingSpinner="dots">
</ion-refresher-content>
</ion-refresher>
<ion-grid>
// 2 rows : the first has filters, the second has the list + ion-infinite-scroll (works pretty good)
</ion-grid>
</ion-content>
My refresh method
doRefresh(event) {
this.currentPage = 1;
// this.transactions = [];
// this.loading = true;
// this.infiniteScroll.disabled = true;
let t = this;
this.listFunction(1).then(response => {
t.transactions = response['results'];
event.target.complete();
// t.infiniteScroll.disabled = false;
// t.loading = false;
})
.catch(() => {
event.target.complete();
// t.loading = false;
// t.infiniteScroll.disabled = false;
})
}
Other information:
Ionic info:
Ionic:
Ionic CLI : 5.0.2 (C:\Users\Tafek\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.1.1
@angular-devkit/build-angular : 0.13.8
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.5
@ionic/angular-toolkit : 1.5.1
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic 5.3.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 8 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
bug: Ion-refresher triggers refresh when "pulling up" to scroll ...
This issue occurs only after first attempt at normal pull down to refresh and it concerns only the lower part of the screen....
Read more >Ionic Refresher triggers on every scroll down
I am having an issue with my IonicRefresher. It doesnt matter where you are within the list of items, if a user is...
Read more >Ionic There is a Bug? ion-refresher and ion-infinite-scroll
When the user scrolls to the end of the screen, $scope.loadMoreContent which is registered with on-infinite is triggered. The spinner shows, and ...
Read more >ion-refresher causing fixed elements to scroll - You.com
Current behavior: The refresher trigger's it's "ionRefresh" method when pulling up (scrolling down). This issue occurs only after first attempt at normal pull...
Read more >Take control of your scroll - customizing pull-to-refresh and ...
Turns out this behavior is called scroll chaining; the browser's default behavior when scrolling content. Oftentimes the default is pretty nice, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ngnkabylbai We were displaying a list of items and the refresher had to call an api to retrieve most recent entries. However, we were emptying the list before calling the API. It was something like this:
And we changed it by:
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.