cubiq / iscroll

Smooth scrolling for the web
http://iscrolljs.com
MIT License
12.88k stars 3.81k forks source link

Not working in the last version of chrome 55+ #1109

Closed cleversonviana closed 7 years ago

cleversonviana commented 7 years ago

I am using you iscroll and this do a great job.

But, looks it's not working anymore in Chrome version 55 on touch screen devices or tablets.

Looks like when you click to scroll, the browser fire the click event and doesn't scroll property.

If you run a simple test on tablet or phone using the last version of chrome, is not working more.

I saw the other post about chrome 55, but none of those options works for me.

AndreasKr commented 7 years ago

I am facing a simiar issue. Since a couple of days iScroll is not working (code was definitly not changed also no js framework is included).

What is your envrionment/which frameworks you are using?

I use jquery+jquery mobile (1.4.5)+iScroll in an android webview (5.x and 6). It seems that iScroll is working (at least on my side) without using jq/jqm

Maybe related to #1107?

Best regards Andreas

kewogc commented 7 years ago

+1 jquery 2.1.4 chrome 55+ on desktop

posti85 commented 7 years ago

Same problem here :(. iScroll is not working when we use it in our hybrid applications running on android devices.

Edit: Downgrading to iscroll@5.1.1 worked for me

OmarRAMIC commented 7 years ago

Same Proble here , iScroll is not working in cordova application running on Android.

if System WebView version is <= 54 iScroll is working ok

as workaround in iscroll.js v 5.2 change the line 298 from disablePointer : !utils.hasPointer, disableTouch : utils.hasPointer || !utils.hasTouch, disableMouse : utils.hasPointer || utils.hasTouch, to disablePointer:true, disableTouch:false, disableMouse:true,

cleversonviana commented 7 years ago

Perfectly... The solution lorddarkzic works perfectly to me...

Thanks

austinhallock commented 7 years ago

A better short-term fix would be to use

disablePointer : true,
disableTouch : !utils.hasTouch,
disableMouse : utils.hasTouch,

so mouse events still work on desktop. Chrome 55 introduced pointer events which is what's causing the issue: https://developers.google.com/web/updates/2016/11/nic55

The above changes probably break iScroll in IE, I haven't tested it.

acti0nm4n commented 7 years ago

Also had this using iscroll-zoom in a Cordova app

Changing disablePointer: true etc also fixes, as well as downgrading to 5.1.1

anacierdem commented 7 years ago

Why is this issue closed?

njam3 commented 7 years ago

Seems related to this: https://developers.google.com/web/updates/2017/01/scrolling-intervention

A quick fix was removing the first 2 if statements from the move function: https://github.com/cubiq/iscroll/blob/master/src/core.js#L177-L183

Removing the preventDefault seemed straightforward but I'm unsure of the impact of removing the initial return

jnfsmile commented 7 years ago

It seems a pointerCancel event is fired early on, so pointerMove becomes irrelevant. We need it to work only by touch events.

By sending disablePointer: true in the configuration object it uses the pointerMove events and things go back to working smoothly.

Though, for some reason, it doesn't happen in all places. I cannot yet identify the root of this issue in the applications that fail.

guykatz commented 7 years ago

hi guys and thanks for all the related posts. I have used them to fix this in my android app. can we expect a formal build that fixes this soon?

megafan2001 commented 7 years ago

Bugs with Chrome 55 under Android 6 have been fixed for me with downgrade to Iscroll 5.1 even the zoom event (in iscroll-zoom)