akiran / akiran/react-slick

Unable to preventDefault inside passive event listener

オープン
#1,650 コメント 10 件 リアクション 10 件 担当者 1 名 @akiran が担当を希望しています GitHub で見る
priority: High
主要言語
JavaScript
スター
11.9k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

First of all, thanks for porting Slick to React, highly appreciated!

When executing some event handlers inside my slides, I am getting this error:

``[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080``

The error occurs in method `swipeMove` here:

```js
if (touchObject.swipeLength > 10) {
state["swiping"] = true;
e.preventDefault();
}
```

https://github.com/akiran/react-slick/blob/master/src/utils/innerSliderUtils.js#L412

This only happens if I wrap these components with the slick carousel and breaks the functionality of the components.

Any idea what might cause this?

One thing to notice: it happens if the slide contains a React Bootstrap Modal and the event is called from within such a modal.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。