@@ -307,6 +307,7 @@ export class Refresher implements ComponentInterface {
307
307
canStart : ( ) => this . state !== RefresherState . Refreshing && this . state !== RefresherState . Completing && this . scrollEl ! . scrollTop === 0 ,
308
308
onStart : ( ev : GestureDetail ) => {
309
309
ev . data = { animation : undefined , didStart : false , cancelled : false } ;
310
+ this . state = RefresherState . Pulling ;
310
311
} ,
311
312
onMove : ( ev : GestureDetail ) => {
312
313
if ( ( ev . velocityY < 0 && this . progress === 0 && ! ev . data . didStart ) || ev . data . cancelled ) {
@@ -317,19 +318,14 @@ export class Refresher implements ComponentInterface {
317
318
if ( ! ev . data . didStart ) {
318
319
ev . data . didStart = true ;
319
320
320
- this . state = RefresherState . Pulling ;
321
-
322
- writeTask ( ( ) => {
323
- const animationType = getRefresherAnimationType ( contentEl ) ;
324
- const animation = createPullingAnimation ( animationType , pullingRefresherIcon ) ;
325
- ev . data . animation = animation ;
321
+ writeTask ( ( ) => this . scrollEl ! . style . setProperty ( '--overflow' , 'hidden' ) ) ;
326
322
327
- this . scrollEl ! . style . setProperty ( '--overflow' , 'hidden' ) ;
328
-
329
- animation . progressStart ( false , 0 ) ;
330
- this . ionStart . emit ( ) ;
331
- this . animations . push ( animation ) ;
332
- } ) ;
323
+ const animationType = getRefresherAnimationType ( contentEl ) ;
324
+ const animation = createPullingAnimation ( animationType , pullingRefresherIcon ) ;
325
+ ev . data . animation = animation ;
326
+ animation . progressStart ( false , 0 ) ;
327
+ this . ionStart . emit ( ) ;
328
+ this . animations . push ( animation ) ;
333
329
334
330
return ;
335
331
}
0 commit comments