StackedRouter: fix default prevention not work
All checks were successful
/ depoly (push) Successful in 1m19s
All checks were successful
/ depoly (push) Successful in 1m19s
This commit is contained in:
parent
8e8554331b
commit
5ecba144f0
1 changed files with 5 additions and 6 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue