Skip to content

picker、scroll相关滚动的组件在PC端部分浏览器无法使用的bug #397

@duoremix

Description

@duoremix

Version

1.12.9

Steps to reproduce

在政务微信1.5版本以上的浏览器中使用picker、scroll等组件即可复现,效果为无法滚动

What is expected?

建议在picker、scroll等组件里,调用better-scroll进行初始化时,设置disablemouse为false。即在pc端同时绑定touch和mouse事件,这样两种场景都能得到满足。

What is actually happening?

原因是better-scroll使用window对象上是否存在ontouchstart事件来判断浏览器为移动端还是pc端,从而决定把滚动事件绑定到touch事件上还是mouse事件上。
而在政务微信1.5版本上,浏览器的window对象是存在ontouchstart事件的,原因推测可能是需要满足目前可支持触碰的笔记本电脑设备。因此在该环境下使用鼠标操作滚动毫无反应。

Dependencies Version

vue: 2.6.0-beta.1
better-scroll: 1.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions