akiran / akiran/react-slick

Unable to preventDefault inside passive event listener

Abierto
#1,650 10 comentarios 10 reacciones 1 asignado Reclamado por @akiran Ver en GitHub
priority: High
Lenguaje dominante
JavaScript
Estrellas
11.9k
Forks
2.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.