Skip to content

Commit

Permalink
fix(cropper): error dragging image while scrolling is in progress
Browse files Browse the repository at this point in the history
fix: Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted.
  • Loading branch information
Enlcxx committed Jul 4, 2020
1 parent 8fc32b6 commit 69db9bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/image-cropper/image-cropper.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<!-- (selectstart): On Safari starting to slide temporarily triggers text selection mode which
show the wrong cursor. We prevent it by stopping the `selectstart` event. -->
<div #_imgContainer
[className]="classes.imgContainer"
(selectstart)="$event.preventDefault()"
>
<canvas #_imgCanvas></canvas>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/image-cropper/image-cropper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const STYLES = (theme: ThemeVariables & LyImageCropperVariables, ref: The
top: 0
left: 0
display: flex
touch-action: none
& > canvas {
display: block
}
Expand Down

0 comments on commit 69db9bc

Please sign in to comment.