Skip to content

Commit

Permalink
Fix scroll bug on iOS 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Hervieu committed Jun 26, 2018
1 parent 5f356c3 commit 8b54e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Cropper extends React.Component {

onTouchStart = e => {
e.preventDefault()
document.addEventListener('touchmove', this.onTouchMove)
document.addEventListener('touchmove', this.onTouchMove, { passive: false }) // iOS 11 now defaults to passive: true
document.addEventListener('touchend', this.onDragStopped)
if (e.touches.length === 2) {
this.onPinchStart(e)
Expand Down

0 comments on commit 8b54e1e

Please sign in to comment.