Skip to content

Commit

Permalink
Stop unzooming on pinch to zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
eych committed Aug 1, 2023
1 parent 4be83e3 commit d8cdf26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/Controlled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ class ControlledBase extends Component<ControlledPropsWithDefaults, ControlledSt
* Unzoom on wheel event
*/
handleWheel = (e: WheelEvent) => {
// don't handle the event when the user is zooming with ctrl + wheel (or with pinch to zoom)
if (e.ctrlKey) return

e.stopPropagation()
queueMicrotask(() => {
this.handleUnzoom()
Expand Down

0 comments on commit d8cdf26

Please sign in to comment.