Fix edges not clickable
This commit is contained in:
parent
f7dd0176c7
commit
cd1177f1d0
|
|
@ -24,9 +24,6 @@ export function useSwipeNavigation(
|
||||||
const fromEdge = t.clientX < EDGE_THRESHOLD
|
const fromEdge = t.clientX < EDGE_THRESHOLD
|
||||||
|| t.clientX > window.innerWidth - EDGE_THRESHOLD;
|
|| t.clientX > window.innerWidth - EDGE_THRESHOLD;
|
||||||
start = fromEdge ? { x: t.clientX, y: t.clientY } : null;
|
start = fromEdge ? { x: t.clientX, y: t.clientY } : null;
|
||||||
if (fromEdge) {
|
|
||||||
e.preventDefault(); // Prevent scrolling on swipe
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onTouchMove = (e: TouchEvent) => {
|
const onTouchMove = (e: TouchEvent) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue