StackedRouter: fix default prevention not work
All checks were successful
/ depoly (push) Successful in 1m19s

This commit is contained in:
thislight 2024-11-21 17:23:40 +08:00
parent 8e8554331b
commit 5ecba144f0
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -316,12 +316,11 @@ const StackedRouter: Component<StackedRouterProps> = (oprops) => {
origFigX = fig0.clientX; origFigX = fig0.clientX;
origFigY = fig0.clientY; origFigY = fig0.clientY;
if ( const isNotInSwipeToBackArea =
fig0.clientX < -22 || (fig0.clientX > 22 && fig0.clientX < window.innerWidth - 22) ||
fig0.clientX > 22 || (fig0.clientX < -22 && fig0.clientX > window.innerWidth + 22);
fig0.clientX < window.innerWidth - 22 ||
fig0.clientX > window.innerWidth + 22 if (isNotInSwipeToBackArea) {
) {
return; return;
} }
// Prevent the default swipe to back/forward on iOS // Prevent the default swipe to back/forward on iOS