ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.93k stars 13.52k forks source link

[IONIC 4] Ignored attempt to cancel a touchmove event with cancelable=false, #15256

Closed wenisy closed 5 years ago

wenisy commented 6 years ago

Bug Report

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

   ionic (Ionic CLI)          : 4.1.0
   Ionic Framework            : @ionic/angular 4.0.0-beta.3
   @angular-devkit/core       : 0.7.2
   @angular-devkit/schematics : 0.7.2
   @angular/cli               : 6.1.2
   @ionic/ng-toolkit          : 1.0.5
   @ionic/schematics-angular  : 1.0.4

Describe the Bug

I add a tap event on ion-item, and to make it could scroll I also add [style.touch-action]="'pan-y'" to make it work.

Pull down to refresh the page, there is a error in console. [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.

Steps to Reproduce Steps to reproduce the behavior:

  1. Pull down the page
  2. Check console, you could get the error.

Related Code

<ion-content>
    <ion-refresher>
    </ion-refresher>
    <ion-list>
        <ion-item (tap)="xxxx()" `[style.touch-action]="'pan-y'">
    </ion-list>
</ion-content>

Expected Behavior No error in console.

Additional Context image

akkitheakhil commented 6 years ago

I have the same issue. Also getting an error "refresher.complete is not a function" any solution to this ?

wenisy commented 6 years ago

@akkitheakhil still waiting...

If you get any solution of this, could you please write it down here?

RHinderiks commented 6 years ago

Same here

copaste commented 6 years ago

I have the same issue.

Silvest89 commented 6 years ago

Having it here as well

ionic (Ionic CLI) : 4.1.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.8 @angular-devkit/core : 0.8.1 @angular-devkit/schematics : 0.8.1 @angular/cli : 6.2.1 @ionic/ng-toolkit : 1.0.8 @ionic/schematics-angular : 1.0.6

babaru commented 6 years ago

Guys, please check Ionic 4 beta docs: https://beta.ionicframework.com/docs/api/refresher

wenisy commented 6 years ago

Guys, please check Ionic 4 beta docs: https://beta.ionicframework.com/docs/api/refresher @babaru

Sorry, I didn't get your point.

You mean we should add

setTimeout(() => {
      console.log('Async operation has ended');
      event.target.complete();
    }, 2000);

In doRefresh function?

I have done that, but still have this issue.

natalieG96 commented 5 years ago

+1

plebani commented 5 years ago

I have same problem. image

Code:

image

petinho commented 5 years ago

Same problem here!

kelvinjp commented 5 years ago

+1

petinho commented 5 years ago

It's solved for me. It was my fault. Now I have the element empty. The component is working and there's no error on the console. My code:

<ion-content padding>
  <ion-refresher  (ionRefresh)="doRefresh($event)">
        <ion-refresher-content>          
        </ion-refresher-content>
  </ion-refresher>
  <ion-card *ngFor="let ticket of currentTickets">
    <ion-card-header>
      {{ticket.Title}}
    </ion-card-header>
    <ion-card-content>
      <div>{{ticket.Description}}</div>
    </ion-card-content>
  </ion-card>
</ion-content>
Jerga99 commented 5 years ago

I am still having this issue. Is there any known fix ?

nbadiganti commented 5 years ago

Still issue persists in the latest ionic version. Any known fix or turn around solution?

Riyaz0001 commented 5 years ago

same problem here. ionic Info: `Ionic:

ionic (Ionic CLI) : 4.3.1 (C:\Users\Riyaz\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : @ionic/angular 4.0.0-beta.15 @angular-devkit/build-angular : 0.8.7 @angular-devkit/schematics : 0.8.7 @angular/cli : 6.2.7 @ionic/angular-toolkit : 1.1.0

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 7.1.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 11 other plugins)

System:

NodeJS : v8.11.2 (C:\Program Files\nodejs\node.exe) npm : 5.6.0 OS : Windows 10`

sashayello commented 5 years ago

Same problem. Have some idea to fix this?

sneko commented 5 years ago

Up. Same error for me

ashvinmay commented 5 years ago

same problem any idea to fix

XieGuoJuan commented 5 years ago

Is there a solution?

paulstelzer commented 5 years ago

This is still not working with beta.17?

KevinKelchen commented 5 years ago

I'm not the OP, but FWIW, I still see the error with Beta 17 in our application.

paulstelzer commented 5 years ago

Thanks for confirming it :)

kharatps02 commented 5 years ago

same issue for us. waiting for fix.

paulstelzer commented 5 years ago

It would be great if someone can create a repo for that so we can see the console error log :)

LautaroLorenz commented 5 years ago

same issue

KevinKelchen commented 5 years ago

Here you go, @paulstelzer.

Steps to Reproduce

  1. Clone this repo on your machine: https://github.com/KevinKelchen/ionic4-refresher-error . It is a very slightly modified version of the blank Angular starter template. The only substantial change is adding the ion-refresher. It is on Beta 19.
  2. In the terminal, path into the repo root and run npm i.
  3. Run ionic serve.
  4. Open the Google Chrome Dev Tools so you can see both the Dev Tools Console as well as the running application.
  5. Pull down on the text content ("The world is your oyster. ...") and it will reveal the refresher.
    • Note: You will need to reload the browser window after the refresh loading spinner appears if you want to try the refresher again. This is a pretty simple sample.
  6. If you pull down at a slower/moderate rate, you will see one or more instances of the error in the console: image
avuenja commented 5 years ago

same issue here

edit I don't know if it helps you, but, I fixed the error in my code, adding async to the called functions in my doRefresh and removed the reset of the variables.

sivadinesh1 commented 5 years ago

Had same error. fixed the error by removing async in doRefresh method. there was two async in doRefresh and in calling http client api

xiaoxiao95888 commented 5 years ago

same error

BassamHabash commented 5 years ago

Hi All, For resolving the complete in not a function, add a variable reference to html <ion-refresher #refresherRef slot="fixed" (ionRefresh)="doRefresh($event)">

and in .ts add : @ViewChild('refresherRef') refresherRef;

doRefresh(refresher) {
    console.log('Begin async operation', refresher);

    setTimeout(() => {
      console.log('Async operation has ended');
      this.refresherRef.complete();
    }, 2000);
  }

and for that error, I have add content empty:

 <ion-refresher-content>
    </ion-refresher-content>

and that work for me.

3adeling commented 5 years ago

I am getting the same error and it is causing me another problem. check my post:

https://forum.ionicframework.com/t/video-refresher-gets-triggered-when-scrolling-down/152807

for my case, I noticed that when I pull the refresher gently and slowly the problem is gone and scroll works fine.

to generate the scrolling issue:

to avoid the scrolling issue:

mtshare commented 5 years ago

Same here +1

sivadinesh1 commented 5 years ago

Same error in latest build too +1

liamdebeasi commented 5 years ago

Hi everyone,

This has been resolved via #17351 and will be in the next release of Ionic. I have published a nightly build with this fix if anyone would be interested in testing with their apps (4.1.0-dev.201903011951.f205b10). Thanks!

rafalschmidt97 commented 5 years ago

Issue still exists. I get this only on android (for example while moving slider). Never on ios.

Screenshot 2019-03-10 at 09 41 55

Ionic:

   ionic (Ionic CLI)             : 4.9.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.1.1
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.2.3

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 8.0.0, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 10 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/rafalschmidt/Library/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 7.0.0
   NodeJS            : v10.15.0 (/usr/local/bin/node)
   npm               : 6.4.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.1 Build version 10B61
liamdebeasi commented 5 years ago

Hi there,

This issue is related to the touchmove event on the refresher component. For anything outside of that, please create a new issue.

Thanks!