From 6efa603fa3212050eabac2d4b6e3c40812458683 Mon Sep 17 00:00:00 2001 From: bon Date: Wed, 28 Aug 2024 15:52:45 +0900 Subject: [PATCH] handle pinch-in/pinch-out on a Mac trackpad --- src/SideEffect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SideEffect.tsx b/src/SideEffect.tsx index 4ba1650..f3bf5e6 100644 --- a/src/SideEffect.tsx +++ b/src/SideEffect.tsx @@ -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; }