Google Chrome reports an error [Intervention] Unable to preventDefault inside passive event listener due to target being ..

There are generally two online solutions. 

1. Modify css 

*{
    touch-action: none;
}
或者
* {
  touch-action: pan-y;
}

该方法测试无效

2. Modify js

在处理函数时写明{ passive: false }

window.addEventListener('touchmove', fn, { passive: false })

测试成功.

 

Guess you like

Origin blog.csdn.net/qq_37514029/article/details/107361626
Recommended