Skip to content

Commit 949b9e8

Browse files
committed
tweak react-remove-scroll patch
1 parent a307f12 commit 949b9e8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

patches/react-remove-scroll+2.6.3.patch

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
diff --git a/node_modules/react-remove-scroll/dist/es2015/SideEffect.js b/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
2-
index 625c185..6cd4d17 100644
2+
index 625c185..52d934f 100644
33
--- a/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
44
+++ b/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
5-
@@ -1,7 +1,5 @@
5+
@@ -1,7 +1,4 @@
66
-import { __spreadArray } from "tslib";
77
import * as React from 'react';
8-
import { RemoveScrollBar } from 'react-remove-scroll-bar';
8+
-import { RemoveScrollBar } from 'react-remove-scroll-bar';
99
-import { styleSingleton } from 'react-style-singleton';
1010
import { nonPassive } from './aggresiveCapture';
1111
import { handleScroll, locationCouldBeScrolled } from './handleScroll';
1212
export var getTouchXY = function (event) {
13-
@@ -13,30 +11,16 @@ var extractRef = function (ref) {
13+
@@ -12,31 +9,16 @@ var extractRef = function (ref) {
14+
return ref && 'current' in ref ? ref.current : ref;
1415
};
1516
var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
16-
var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
17+
-var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
1718
-var idCounter = 0;
1819
var lockStack = [];
1920
export function RemoveScrollSideCar(props) {
@@ -42,7 +43,7 @@ index 625c185..6cd4d17 100644
4243
var shouldCancelEvent = React.useCallback(function (event, parent) {
4344
if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {
4445
return !lastProps.current.allowPinchZoom;
45-
@@ -139,10 +123,7 @@ export function RemoveScrollSideCar(props) {
46+
@@ -139,10 +121,7 @@ export function RemoveScrollSideCar(props) {
4647
document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
4748
};
4849
}, []);

0 commit comments

Comments
 (0)