最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - dragula.js: unable to preventDefault inside passive event listener due to target being treated as passive - Stack O

programmeradmin5浏览0评论

I am using dragula js to use drag and drop in mobile devices and suddenly ran into a problem where I am getting the following error.

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

and the error hits the following function

function drag (e) {
    if (!_mirror) {
      return;
    }
    e.preventDefault();
    //other code
  }

what might be the problem here?

I am using dragula js to use drag and drop in mobile devices and suddenly ran into a problem where I am getting the following error.

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

and the error hits the following function

function drag (e) {
    if (!_mirror) {
      return;
    }
    e.preventDefault();
    //other code
  }

what might be the problem here?

Share Improve this question asked Dec 10, 2018 at 6:03 user10249871user10249871
Add a ment  | 

1 Answer 1

Reset to default 7

This seems to be a problem with the breaking upgrades to chrome 56 to improve the performance in scrolling, Please check here

https://github./bevacqua/dragula/issues/468

You can define touch-action: none to the drag handle to resolve the issue.

Seems to be a problem with bindings for the pointer events.

My issue was solved by adding touch-action: none to the drag handle.

发布评论

评论列表(0)

  1. 暂无评论