StackedRouter: try to fix the swipe to back
All checks were successful
/ depoly (push) Successful in 1m21s
All checks were successful
/ depoly (push) Successful in 1m21s
This commit is contained in:
parent
e124d3e5b8
commit
4d3f5c911b
1 changed files with 5 additions and 8 deletions
|
@ -306,10 +306,7 @@ const StackedRouter: Component<StackedRouterProps> = (oprops) => {
|
||||||
}
|
}
|
||||||
const [fig0] = event.touches;
|
const [fig0] = event.touches;
|
||||||
const { x, width } = event.currentTarget.getBoundingClientRect();
|
const { x, width } = event.currentTarget.getBoundingClientRect();
|
||||||
if (
|
if (fig0.clientX < x - 22 || fig0.clientX > x + 22) {
|
||||||
fig0.clientX - fig0.radiusX < x - 22 ||
|
|
||||||
fig0.clientX + fig0.radiusX > x + 22
|
|
||||||
) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
origX = x;
|
origX = x;
|
||||||
|
@ -416,10 +413,10 @@ const StackedRouter: Component<StackedRouterProps> = (oprops) => {
|
||||||
class="StackedPage"
|
class="StackedPage"
|
||||||
onCancel={[popFrame, 1]}
|
onCancel={[popFrame, 1]}
|
||||||
onClick={[onDialogClick, popFrame]}
|
onClick={[onDialogClick, popFrame]}
|
||||||
onTouchStart={onDialogTouchStart}
|
on:touchstart={onDialogTouchStart}
|
||||||
onTouchMove={onDialogTouchMove}
|
on:touchmove={onDialogTouchMove}
|
||||||
onTouchEnd={onDialogTouchEnd}
|
on:touchend={onDialogTouchEnd}
|
||||||
onTouchCancel={onDialogTouchCancel}
|
on:touchcancel={onDialogTouchCancel}
|
||||||
id={frame().rootId}
|
id={frame().rootId}
|
||||||
>
|
>
|
||||||
<StaticRouter url={frame().path} {...oprops} />
|
<StaticRouter url={frame().path} {...oprops} />
|
||||||
|
|
Loading…
Reference in a new issue