iscroll partial failure slide in Google browser

Today In doing pull-down refresh mobile terminal and the LAC upload function with iScroll.js, when Google browser debugging, found not work properly when pulling with the mouse, slide it up, the designated area can only move it 4px, which obviously not normal, (in firefox test is normal, no phone mode also can slide)



Carefully debugging for a long time, only to find the problem, it simply is unified pointer events due to Google Chrome

So, how Google mobile operating iScroll.js end of it?

1. The code implements (recommended):

 //获取所需要的元素
    var jdCateLeft=document.querySelector('.jd_cateLeft');
    //取消事件默认动作
    jdCateLeft.addEventListener('touchmove',function(e){
        e.preventDefault();
    });

2. The browser itself is set (disabled globally)   Chrome: // flags / # enable-pointer-Events

3 or partially closed:

<!-- 将这段代码放在 head 标签内 -->
<script>window.PointerEvent = void 0</script>
The above are several ways to solve this problem, but personally recommend using the first method
Published 22 original articles · won praise 124 · views 130 000 +

Guess you like

Origin blog.csdn.net/lgx1134569285/article/details/80961023