Repository navigation
fix(editor): add copy and paste shortcuts for fields - #3389
Open
ephraimduncan wants to merge 5 commits into
Open
ephraimduncan wants to merge 5 commits into
ephraimduncan wants to merge 5 commits into
Conversation
The envelope editor had no handler for Ctrl+C and Ctrl+V. As a result, the documented shortcuts did nothing in the document and template editors.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Contributor
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
3 of 5 tasks
5 tasks done
# Conflicts: # apps/remix/app/components/general/envelope-editor/envelope-editor-fields-page.tsx
Each paste moves the copy by one offset from the last copy. After many pastes, the position was more than 100 and the server rejected the save. `duplicateField` stops the copy at the page edge, the same as `duplicateContent`.
The contents tab hides the fields. A paste on that tab, or while a different envelope item was open, added a field that the author could not see.
The flow ran on the document editor and the template editor only. It runs on embedded create and embedded edit also.
ephraimduncan
added a commit
that referenced
this pull request
Nov 18, 2026
#3395 moved the canvas selection out of the page renderer and into `useEnvelopeCanvasSelection` and `useEditorFormArray`. The selection changes of this branch applied to code that #3395 removed. This merge keeps the page renderer and `useEditorFields` of branch main, and keeps the shortcuts for one field from #3389. The next commit adds the copy of all selected fields to the new canvas hooks.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In the document and template editors, Ctrl+C and Ctrl+V did nothing when a field was selected. The documentation says that these shortcuts copy and paste a field. The legacy editor had the shortcuts, but the envelope editor did not.
With this change, Ctrl+C (Cmd+C on macOS) copies the selected field and shows a "Copied field" toast. Ctrl+V (Cmd+V) adds a copy of the field on the same page, a small distance down and to the right. Each paste starts from the last copy, so repeated pastes make a diagonal row and do not stack on one position.
The shortcuts do not operate when the focus is in a text input or when the user has selected text on the page. In these cases, the browser copy and paste operate as before.
Related Issue
Related: documenso/backlog-internal#840
Changes Made
EnvelopeEditorFieldsPageduplicateFieldoperationTesting Performed
packages/app-tests/e2e/envelope-editor-v2/envelope-fields.spec.tsfor copy and paste in the document editor and the template editorChecklist
Additional Notes
This PR copies one selected field at a time. The follow-up PR #3390 adds copy and paste for more than one selected field. Merge this PR before #3390.