Skip to content

Commit 0e6aee9

Browse files
committed
chore: rm scroll block check to avoid screen scroll when console opened
1 parent 5b31730 commit 0e6aee9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/hooks/useTouchMove.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ export default function useTouchMove(
9292
}
9393

9494
// >>> Wheel event
95-
const lastMixedWheelRef = useRef(0);
9695
const lastWheelTimestampRef = useRef(0);
9796
const lastWheelPreventRef = useRef(false);
9897
const lastWheelDirectionRef = useRef<'x' | 'y'>();
@@ -115,9 +114,8 @@ export default function useTouchMove(
115114

116115
// Optimize mac touch scroll
117116
const now = Date.now();
118-
const absMixed = Math.abs(mixed);
119117

120-
if (now - lastWheelTimestampRef.current > 100 || absMixed - lastMixedWheelRef.current > 10) {
118+
if (now - lastWheelTimestampRef.current > 100) {
121119
lastWheelPreventRef.current = false;
122120
}
123121

@@ -127,7 +125,6 @@ export default function useTouchMove(
127125
}
128126

129127
lastWheelTimestampRef.current = now;
130-
lastMixedWheelRef.current = absMixed;
131128
}
132129

133130
// ========================= Effect =========================

0 commit comments

Comments
 (0)