akiran / akiran/react-slick

IOS 14 and up - slider won't scroll on drag

Abierto
#2,380 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
11.9k
Forks
2.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

On mobile, IOS 14 and up (chrome and safari), the slider does not scroll when dragging it.

I have found that the following snippet seems to fix it.

**Fix**

`document.addEventListener("touchstart", () => {}, { passive: false });`

It works by overriding the touchStart event to not be passive, meaning that `e.preventDefault()` can run on this event, which seems to be a requirement for Slick Slider.

I'm not sure if I have missed a less hacky fix for this though. Has any one else solved this?

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.