AI智能
改变未来

Unable to preventDefault inside passive event listener due to target being treated as passive


[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive

  • 使用mui的scroll出现该错误
  • 解决办法方法1,在有滚动的容器css样式添加如下代码
  • 方法2,在全局样式样式添加如下代码
/* 方法1 */touch-action: pan-y;
/* 方法2 */*{touch-action: pan-y;}
赞(0) 打赏
未经允许不得转载:爱站程序员基地 » Unable to preventDefault inside passive event listener due to target being treated as passive