-
Notifications
You must be signed in to change notification settings - Fork 3.8k
iScroll and Chrome 55... #1100
Comments
me too. but my browser is chrome canary, other do well. |
@leuvi yeah, looks like Canary is showing Chrome v56. |
iScroll doesn't work correctly with PointerEvents as just implemented in Chrome 55, which also has knock-on effects on other plugins using events. We've disabled the PointerEvents check in our application for now, making iScroll fall back to regular events. This fixes the problem. |
add |
iScroll has an undocumented The following settings appear to work well for us in Chrome 55 for Windows/Android/webview:
|
@boaz-amit this is great! Bu you also need to set You should basically add these three lines to your options object:
|
@toser Thanks, good point. In my case, |
@boaz-amit thanks, hahaha~~~~ |
Hello, Does suggested fix (temporarily disable PointerEvents) disable any of the functionality of this plugin (infinite scrolling)? Thank you |
I think the suggested fix (PointerEvent = undefined) does not disable any of the functionality, because before Chrome 55 the PointerEvents object did not exist (by default) [https://www.chromestatus.com/feature/4504699138998272]. Therefore, if your code worked, it should continue to do so. |
Those didn't work for me.. Any clue ? |
Experiencing the same problems on Android System WebView 55.0.2883.91. Since the update, scrolling seems to hang and jank along only a few pixels. The fix below does NOT resolve the issue on our end: disablePointer: true, // important to disable the pointer events that causes the issues Any other workaround is greatly appreciated. Thanks. |
@earnaz iScroll has some default value for options, which is in |
Problem solved....... if System WebView version is <= 54 iScroll is working ok as workaround in iscroll.js v 5.2 |
Hi, I am having issues in Chrome on Windows. The disablePointer: true fix solved the issue in Chrome on Mac. |
Chrome 55+ starts to support I think iScroll should apply touch-action property according to directions. this issue is so serious issue. @cubiq could you bump revision number? |
ref #1039 |
Using:
solved the issue for me. However, I can't scroll anymore when touchstart starts on the iscroll element: Can be tested at http://datamatic.io using Chrome dev tools.. |
What @sculove mentioned above is the right solution here: instead of disabling the pointer event support, please add a CSS property "touch-action: none" to the element that should be scrolled through JS handlers. For example, the iScroll event-passthrough demo should add "touch-action: none" CSS property to #scroller. Details: One important difference of PointerEvents from TouchEvents is that a browser touch-action (browser scrolling action in this case) dispatches a "pointercancel" event and then suppresses dispatching of more pointer events while browser is "in change" of the scrolling. Adding "touch-action: none" suppresses browser scrolling, so JS will received all pointer events to handle the scrolling itself. |
Rather than fixing the demo (and asking each user to set touch-action themself), perhaps the iScroll JavaScript should be setting |
Note that I'd expect all of these sites to already be broken in Edge / IE (which has long had pointer events - we've now just shipped it in Chrome too, and it's coming soon in Firefox). Are there any examples here of something that's working in Edge but broken in Chrome? |
From code inspection of core.js, it looks to me like the right fix is something like this (warning: untested): disable: function () {
this.wrapper.style.touchAction='';
this.enabled = false;
},
enable: function () {
var touchAction = 'none'
if ( this.options.eventPassthrough == 'vertical' ) {
touchAction = 'pan-y';
} else if ( this.options.eventPassthrough == 'horizontal' ) {
touchAction = 'pan-x';
}
this.wrapper.style.touchAction = touchAction;
if (touchAction != 'none') {
// add pinch-zoom support if the browser supports it, but if not (eg. Chrome <55) do nothing
this.wrapper.style.touchAction += ' pinch-zoom';
}
this.enabled = true;
}, |
Thanks @RByers for suggesting a perfect fix. Most of the demos work in Edge/IE because they have MS-prefixed CSS property: |
Edge no longer supports |
The Edge I tested had touch events enabled, sorry. Rick is right, Edge is broken for pointer events. |
thank you for @RByers |
Sorry, I don't have enough experience with iScroll to test that my patch fixes edge cases correctly (nor do I have the time). Hopefully someone with experience contributing to iScroll will test it out and land it. |
@hutchski add style {touch-action: none} to scroller element, perfect!! tks @mustaqahmed |
@sculove Thanks for all your hard work! Are the recent commits to the build files going to be versioned into a separate release than the current 5.2.0? |
@boaz-amit
but, I do not have permission to upload a version. Threrefore, you can download following coomand npm i github:cubiq/iscroll --save |
@toser and @mustaqahmed's settings proposal work together as a solution for me. Thanks! |
I am testing using Chrome 55, which, I am reading, Google hopes to release December 6, 2016. When I simulate a mobile device, horizontal scrolling in the carousel is not working right. Instead of smoothly scrolling, it seems to hang and jank along only a few pixels:
http://lab.cubiq.org/iscroll5/demos/event-passthrough/
Chrome 54 seems to handle everything fine. Is there a fix or workaround for this?
The text was updated successfully, but these errors were encountered: