Skip to content

Commit

Permalink
fix(*): Added stopPropagation on touchmove
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenashpole committed Jan 5, 2022
1 parent fd7dd97 commit 5005561
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

- This handy CHANGELOG.

### Fixed

- Added `stopPropagation` on touchmove to prevent events below fullscreen modal.

## [2.1.0](https://github.com/laurenashpole/react-inner-image-zoom/compare/v2.0.3...v2.1.0) (2021-08-30)

### Added
Expand Down
1 change: 1 addition & 0 deletions src/InnerImageZoom/InnerImageZoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const InnerImageZoom = ({
};

const handleDragMove = useCallback((e) => {
e.stopPropagation();
let left = (e.pageX || e.changedTouches[0].pageX) - imgProps.current.offsets.x;
let top = (e.pageY || e.changedTouches[0].pageY) - imgProps.current.offsets.y;

Expand Down

0 comments on commit 5005561

Please sign in to comment.