Skip to content

fix(formplayer): ignore page swipes that start on the signature canvas - #1038

Merged
r0ssing merged 1 commit into
OpenDataEnsemble:devfrom
najuna-brian:fix/formplayer-signature-swipe-guard
Oct 28, 2026
Merged

r0ssing merged 1 commit into
OpenDataEnsemble:devfrom
najuna-brian:fix/formplayer-signature-swipe-guard

Conversation

@najuna-brian

@najuna-brian najuna-brian commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

What & Why

Signing sideways still changed the page after #1032. That PR stops propagation inside the canvas's React touch handlers, but the page swipe comes from react-swipeable, which listens with native listeners on the form's scroll area. React dispatches from the root, after that native listener has run, so the swipe still fired and the unfinished signature was lost.

1-before-signature-jumps-page 2-after-signature-stays

This change makes SwipeLayoutRenderer ignore swipes whose touch started on a canvas (the signature pad) or on any element marked data-no-swipe. Touch events keep the element where the finger went down as their target, so the check holds on Android WebView and iOS WKWebView. Swiping anywhere else on the page navigates as before.

The new SwipeLayoutRenderer.test.tsx renders the real swipe layout with a signature question and sends touch swipes. The canvas test fails on current dev and passes with this change; a second test confirms normal page swipes still work.

Type of Change

  • Bug fix
  • New feature / enhancement
  • Refactor / cleanup
  • Documentation
  • Chore / other

Component(s) Changed

  • formulus (React Native mobile app)
  • formulus-formplayer (form WebView UI)
  • synkronus (Go backend)
  • synkronus-cli (command-line client)
  • synkronus-portal (web admin UI)
  • desktop (Tauri app)
  • packages (tokens / components)
  • Documentation / DevOps / CI

Testing

  • Added/updated tests
  • Manually tested
  • Not applicable

Checklist

  • Pre-flight checks for changed packages passed (lint / format / tests)
  • Breaking changes (if any) have migration steps
  • Related issue linked, e.g. Closes #123

Closes #1037

@r0ssing
r0ssing merged commit c66b9b4 into OpenDataEnsemble:dev Oct 28, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Done in ODE Community Board Oct 28, 2026
@najuna-brian
najuna-brian deleted the fix/formplayer-signature-swipe-guard branch October 28, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

[Formplayer] Signing sideways still changes the page after #1032

2 participants