Skip to content

[Bug Report] picker组件在ios 13 flutter webview中,在touchmove阶段阻止默认事件,会存在与系统滚动线程的竞态条件,如果在滚动线程介入后才触发preventDefault,会导致webkit将手势系统给标记为invalid,导致整个页面的touch事件失效,进而导致页面卡死 #13732

@yangzhenqian

Description

@yangzhenqian

重现链接

需要ios系统的webview

Vant 版本

2.11.1

描述一下你遇到的问题。

picker组件在ios 13 flutter webview中,在touchmove阶段阻止默认事件,会存在与系统滚动线程的竞态条件,如果在滚动线程介入后才触发preventDefault,会导致webkit将手势系统给标记为invalid,导致整个页面的touch事件失效,进而导致页面卡死

重现步骤

解决方案: 1. 将preventDefault 前移至 touchstart中阻止,去除touchmove中preventDefault
2. ios13中 使用 css touch-action: none (ios13以下不识别) 代替touchmove中preventDefault

设备/浏览器

ios系统 webview

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions