iscroll在chrome下元素的鼠标事件不起作用

// scroll区域
<div class="wrap">
  <div class="scroll">

    // 轮播图
    <div class="swiper-container">
        <div class="swiper-wrapper">
          <div class="swiper-slide">slide 1</div>
          <div class="swiper-slide">slide 2</div>
          ...
        </div>
        <div class="swiper-pagination"></div>
    </div>
    
    <div class="item">尾</div>
    ...
    <div class="item">头</div>
  </div>
</div>
let myScroll = new IScroll('.wrap', {
  mouseWheel: true,
  scrollbars: true,
  click: true
})
let mySwiper = new Swiper('.swiper-container', {
  pagination: '.swiper-pagination',
  loop: true,
  autoplay: 2000,
  autoplayDisableOnInteraction: false,
  paginationClickable: true,
  touchMovePropagation: false,
  preventLinksPropagation : true,
  onTouchStart (swiper, event) {
    console.log('touchstart')
  }
})

实现:轮播图的滑动。

火狐下能正常运行,谷歌模拟移动端下也能正常运行,但是在谷歌pc端下面轮播图不能滑动。

谷歌pc端:
IScroll下面的元素的mouseup等鼠标事件不起作用,设置disableMouse=false也不起作用。
在其他浏览器暂时没问题,不知道问什么。

阅读 3.2k
1 个回答

谷歌pc端:
IScroll下面的元素的mouseup等鼠标事件不起作用,设置disableMouse=false也不起作用。
在其他浏览器暂时没问题,不知道问什么。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题