Skip to content

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

Closed

Description

@najuna-brian

Component

  • formulus-formplayer (React web app)

Description

Drawing a signature sideways still changes the page after #1032. The stroke draws on the canvas, then the form swipes to the next or previous page and the unfinished signature is lost.

#1032 calls stopPropagation() inside the canvas's React touch handlers, but the page swipe comes from react-swipeable, which attaches native listeners to the form's scroll area. React handles events at the root, after the native listener on the scroll area has already run, so the swipe still fires. The test added in #1032 uses a React onTouchStart parent, so it passes without exercising the real swipe listener.

Steps to Reproduce

  1. Open a form with a signature question inside a SwipeLayout (any multi-page form).
  2. Go to the signature page.
  3. Draw a sideways stroke, or a normal signature that moves left to right, inside the signature box.

Expected Behavior

The stroke stays on the canvas and the page does not change.

Actual Behavior

The page changes to the next or previous page and the signature is cleared.

Before/after recordings are attached in the comments below.

Acceptance Criteria

  • Strokes that start on the signature canvas never change the page.
  • Swiping elsewhere on the page still navigates.
  • A test renders the real SwipeLayoutRenderer with a signature and fails without the fix.

Environment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions