From 5fab7cf3695ef5e9ac8468d563afd798f946d049 Mon Sep 17 00:00:00 2001 From: ENvironmentSet Date: Fri, 13 Mar 2026 16:23:49 +0900 Subject: [PATCH 1/2] fix(react-ui-core): clamp swipe-back dx to prevent left-drag screen movement When a user starts a touch on the left edge and drags left, dx becomes negative and moveActivity was translating the screen to the left. Clamping dx to Math.max(0, ...) ensures only right swipes move the screen, matching native iOS behavior. Closes FEP-1995 --- extensions/react-ui-core/src/useStyleEffectSwipeBack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/react-ui-core/src/useStyleEffectSwipeBack.ts b/extensions/react-ui-core/src/useStyleEffectSwipeBack.ts index 9870aa1a7..610c91829 100644 --- a/extensions/react-ui-core/src/useStyleEffectSwipeBack.ts +++ b/extensions/react-ui-core/src/useStyleEffectSwipeBack.ts @@ -251,7 +251,7 @@ export function useStyleEffectSwipeBack({ x = e.touches[0].clientX; - const dx = x - x0; + const dx = Math.max(0, x - x0); const ratio = dx / $paper.clientWidth; moveActivity({ dx, ratio }); From 25690c3cc49014c1b0cbe7554d2662c22b18bcb5 Mon Sep 17 00:00:00 2001 From: ENvironmentSet Date: Fri, 13 Mar 2026 16:33:46 +0900 Subject: [PATCH 2/2] chore: add changeset for swipe-back direction lock fix --- .changeset/fix-swipe-back-direction-lock.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-swipe-back-direction-lock.md diff --git a/.changeset/fix-swipe-back-direction-lock.md b/.changeset/fix-swipe-back-direction-lock.md new file mode 100644 index 000000000..8ca3ab402 --- /dev/null +++ b/.changeset/fix-swipe-back-direction-lock.md @@ -0,0 +1,5 @@ +--- +"@stackflow/react-ui-core": patch +--- + +fix(react-ui-core): clamp swipe-back dx to prevent left-drag screen movement