Skip to content

Commit

Permalink
fix(ImageViewer): Only call document.preventDefault() when dragging (#…
Browse files Browse the repository at this point in the history
…403)

* fix(ImageViewer) Only call document.preventDefault() when dragging

* Trigger CI
  • Loading branch information
Austin Piel authored Oct 9, 2020
1 parent ee3d85a commit bfb682d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/components/ImageViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ export default function ImageViewer({
};

const handleMouseMove = (event: MouseEvent) => {
event.preventDefault();

if (!dragging) {
return;
}

event.preventDefault();

const xDiff = lastMouseLocation.x - event.pageX;
const yDiff = lastMouseLocation.y - event.pageY;

Expand Down

0 comments on commit bfb682d

Please sign in to comment.