Skip to content

fix(ui): reset local signature state on open/close in SignaturePadDialog (#3203) - #3265

Closed
Rodrigoue9 wants to merge 1 commit into
documenso:mainfrom
Rodrigoue9:fix/bounty-3203
Closed

Rodrigoue9 wants to merge 1 commit into
documenso:mainfrom
Rodrigoue9:fix/bounty-3203

Conversation

@Rodrigoue9

Copy link
Copy Markdown
Contributor

Title

fix(ui): reset local signature state when opening and closing SignaturePadDialog (#3203)

Description

  • Resets local signature state to value ?? '' whenever SignaturePadDialog is opened or closed.
  • Prevents abandoned or cancelled drawings from persisting in component local state and erroneously committing to documents on subsequent confirms.

Closes #3203

@vercel

vercel Bot commented Aug 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
prd-docs Ignored Ignored Aug 19, 2026 2:30am
prd-openpage-api Ignored Ignored Aug 19, 2026 2:30am
stg-docs Skipped Skipped Aug 19, 2026 2:30am

Request Review

@vercel
vercel Bot temporarily deployed to Preview – stg-docs August 19, 2026 02:30 Inactive
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8d9c9974-e8dd-4831-bbc4-4d515d6bad0a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Mythie

Mythie commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Hey there, it looks like you haven't accepted our contributor license agreement yet. In order for us to accept your pull request we ask that you please fill out the CLA:

https://documen.so/cla

</motion.button>

<Dialog open={showSignatureModal} onOpenChange={disabled ? undefined : setShowSignatureModal}>
<Dialog

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix seems correct. Please extract the reset into a single onOpenChange(open) handler. Something like:

const onOpenChange = (open: boolean) => {
     if (disabled) {
       return;
     }

     setSignature(value ?? '');
     setShowSignatureModal(open);
   };

@catalinpit

Copy link
Copy Markdown
Member

Thanks for working on this! Since the requested changes haven't been addressed, I've combined this and a similar PR into #3408, so I'm closing this one.

This branch was previously deployed

1 inactive deployment
Preview – stg-docs — 26546661 Deployed Aug 19, 2026 by vercel[bot]
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.

Signature pad keeps a discarded drawing in local state and commits it on the next confirm

3 participants