mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
fix(scroll): canOverscroll was set to false which prevented PTR from ever working
It’s still finishing the PTR before the complete is called though References #5207
This commit is contained in:
@ -94,7 +94,7 @@ export class Refresher {
|
|||||||
ptrThreshold: number = 0;
|
ptrThreshold: number = 0;
|
||||||
activated: boolean = false;
|
activated: boolean = false;
|
||||||
scrollTime: number = 500;
|
scrollTime: number = 500;
|
||||||
canOverscroll: boolean = false;
|
canOverscroll: boolean = true;
|
||||||
startY;
|
startY;
|
||||||
deltaY;
|
deltaY;
|
||||||
scrollHost;
|
scrollHost;
|
||||||
|
@ -4,14 +4,15 @@ import {App} from 'ionic/ionic';
|
|||||||
@App({
|
@App({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class MyApp {
|
class E2EApp {
|
||||||
|
|
||||||
doRefresh(refresher) {
|
doRefresh(refresher) {
|
||||||
console.log('DOREFRESH', refresher)
|
console.log('DOREFRESH', refresher)
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
refresher.complete();
|
refresher.complete();
|
||||||
})
|
console.log("Complete");
|
||||||
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
doStarting() {
|
doStarting() {
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
<!-- <ion-view nav-title="Pull to refresh"> -->
|
|
||||||
<ion-toolbar><ion-title>Pull To Refresh</ion-title></ion-toolbar>
|
<ion-toolbar><ion-title>Pull To Refresh</ion-title></ion-toolbar>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<ion-refresher (starting)="doStarting()" (refresh)="doRefresh($event, refresher)" (pulling)="doPulling($event, amt)">
|
<ion-refresher
|
||||||
|
(starting)="doStarting($event)"
|
||||||
|
(refresh)="doRefresh($event, refresher)"
|
||||||
|
(pulling)="doPulling($event, amt)">
|
||||||
</ion-refresher>
|
</ion-refresher>
|
||||||
<f></f>
|
<f></f>
|
||||||
<f></f>
|
<f></f>
|
||||||
@ -13,16 +15,8 @@
|
|||||||
<f></f>
|
<f></f>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
||||||
<!-- </ion-view> -->
|
|
||||||
<style>
|
<style>
|
||||||
f { display: block; height: 400px; width: 100%; background-color: #387ef5; margin-bottom: 15px; }
|
f {
|
||||||
#counter {
|
display: block; height: 400px; width: 100%; background-color: #387ef5; margin-bottom: 15px;
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
background-color: rgba(0,0,0,0.4);
|
|
||||||
z-index: 5;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user