diff --git a/src/platform/StackedRouter.tsx b/src/platform/StackedRouter.tsx index 4eb58bb..887a8a5 100644 --- a/src/platform/StackedRouter.tsx +++ b/src/platform/StackedRouter.tsx @@ -316,12 +316,11 @@ const StackedRouter: Component = (oprops) => { origFigX = fig0.clientX; origFigY = fig0.clientY; - if ( - fig0.clientX < -22 || - fig0.clientX > 22 || - fig0.clientX < window.innerWidth - 22 || - fig0.clientX > window.innerWidth + 22 - ) { + const isNotInSwipeToBackArea = + (fig0.clientX > 22 && fig0.clientX < window.innerWidth - 22) || + (fig0.clientX < -22 && fig0.clientX > window.innerWidth + 22); + + if (isNotInSwipeToBackArea) { return; } // Prevent the default swipe to back/forward on iOS