Skip to content

fix(touch): support placement on touchend without prior touchmove#49

Merged
vitormattos merged 1 commit intoLibreSign:mainfrom
Phillipxh:fix/touchend-placement-fallback
Mar 31, 2026
Merged

fix(touch): support placement on touchend without prior touchmove#49
vitormattos merged 1 commit intoLibreSign:mainfrom
Phillipxh:fix/touchend-placement-fallback

Conversation

@Phillipxh
Copy link
Copy Markdown
Contributor

Summary

  • handle touch pointer extraction with changedTouches fallback (not only touches[0])
  • extract preview-position calculation into a shared helper
  • allow finishAdding(event) to compute preview from pointer event when no prior hover/move was recorded

Why

In mobile flows, placement can happen on touchend without a preceding touchmove. In that case, preview coordinates were not resolved and adding could silently fail.

Tests

  • add unit test for getPointerPosition() with touchend + changedTouches
  • add unit test proving object placement works on touchend even without prior touchmove

Related

Signed-off-by: Phillip <phillipxh@gmail.com>
@Phillipxh Phillipxh force-pushed the fix/touchend-placement-fallback branch from 0e80aae to b93cc2c Compare March 31, 2026 17:55
@vitormattos vitormattos merged commit f31a215 into LibreSign:main Mar 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants