react-remove-scroll
Advanced tools
Comparing version
@@ -41,3 +41,3 @@ import { __spreadArray } from "tslib"; | ||
var shouldCancelEvent = React.useCallback(function (event, parent) { | ||
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; | ||
@@ -44,0 +44,0 @@ } |
@@ -39,3 +39,3 @@ import * as React from 'react'; | ||
const shouldCancelEvent = React.useCallback((event, parent) => { | ||
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; | ||
@@ -42,0 +42,0 @@ } |
@@ -46,3 +46,3 @@ "use strict"; | ||
var shouldCancelEvent = React.useCallback(function (event, parent) { | ||
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; | ||
@@ -49,0 +49,0 @@ } |
{ | ||
"name": "react-remove-scroll", | ||
"version": "2.5.10", | ||
"version": "2.6.0", | ||
"description": "Disables scroll outside of `children` node.", | ||
@@ -5,0 +5,0 @@ "main": "dist/es5/index.js", |
79125
0.18%