We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaabcb8 commit 53cb09cCopy full SHA for 53cb09c
src/hooks/useScrollDrag.ts
@@ -10,7 +10,7 @@ export function getPageXY(
10
horizontal: boolean,
11
) {
12
const obj = 'touches' in e ? e.touches[0] : e;
13
- return obj[horizontal ? 'pageX' : 'pageY'];
+ return obj[horizontal ? 'pageX' : 'pageY'] - window[horizontal ? 'scrollX' : 'scrollY'];
14
}
15
16
export default function useScrollDrag(
0 commit comments