Skip to content

Commit

Permalink
Merge pull request #113 from bon10/master
Browse files Browse the repository at this point in the history
Handle pinch-in/pinch-out on a Mac trackpad
  • Loading branch information
theKashey authored Aug 30, 2024
2 parents 8923c51 + 6efa603 commit db83df5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SideEffect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function RemoveScrollSideCar(props: IRemoveScrollEffectProps) {
}, [props.inert, props.lockRef.current, props.shards]);

const shouldCancelEvent = React.useCallback((event: WheelEvent | TouchEvent, parent: HTMLElement) => {
if ('touches' in event && event.touches.length === 2) {
if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {
return !lastProps.current.allowPinchZoom;
}

Expand Down

0 comments on commit db83df5

Please sign in to comment.