Skip to content

Let readers select, move, resize, and remove placed signatures in Select mode - #112

Merged
mberman84 merged 4 commits into
mainfrom
fix/select-placed-signature
Nov 27, 2026
Merged

mberman84 merged 4 commits into
mainfrom
fix/select-placed-signature

Conversation

@mberman84

Copy link
Copy Markdown
Collaborator

Problem

After placing a signature, clicking it in normal Select mode did nothing — moving, resizing, or deleting it only worked if someone switched to Highlight mode (#105).

Change

  • Made placed signatures (.stampEditor) clickable in Select mode (outside Edit mode) via enableSignatureEditing in src/signatures.ts and src/styles.css.
  • Clicking a placed signature enters pdf.js stamp editing for that signature (while keeping Select highlighted in the toolbar) so readers can drag to move it, drag corner/edge handles to resize it, undo/redo changes with Ctrl+Z/⌘Z, or remove it with Delete/Backspace or the floating trash button.
  • Clicking anywhere outside the signature, deleting it, or pressing Escape immediately returns to normal reading and text selection, and moving/resizing/removing marks the document as having unsaved changes.
  • Fixed the floating .editToolbar inheriting .annotationEditorLayer's 100px font size (which shifted the trash icon out of its button), hid pdf.js's unused Alt Text button on stamp editors, and gave the delete button an accessible Remove signature label.
  • Added end-to-end assertions in scripts/smoke-test.mjs covering selecting, moving, resizing, undoing, deleting via keyboard and toolbar button, and pressing Escape.

Issue or approval

Closes #105.

How I checked it

  • Verified on macOS (darwin): npm run build (tsc --noEmit && vite build) and the full node scripts/smoke-test.mjs suite pass, including the new signature select/move/resize/undo/remove test and all existing signing tests.
  • Inspected real before/after screenshots of clicking a placed signature in Select mode.
  • Windows and Linux builds and smoke tests run in GitHub Actions CI.

Implemented with Gemini 4 Neon in T3 Code.

@mberman84
mberman84 merged commit 16f8da3 into main Nov 27, 2026
3 checks passed
@mberman84
mberman84 deleted the fix/select-placed-signature branch November 27, 2026 23:52
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.

Let a placed signature be moved, resized or removed after it's added

1 participant