akiran / akiran/react-slick

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

オープン
#2,380 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
11.9k
フォーク
2.1k
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

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

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

評価

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

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

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