[PR #2350] fix: prevent share dialog from closing when triggered via dropdown #2237

Open
opened 2026-02-26 20:33:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/2350
Author: @sarthakitaliya
Created: 1/1/2026
Status: 🔄 Open

Base: mainHead: fix/2335-share-dialog-dropdown


📝 Commits (4)

  • 6af0c1b fix: prevent share dialog from closing when triggered via dropdown
  • e4bbb41 fix: ensure dialog closes properly after share link actions
  • ff81ae1 Update packages/ui/components/document/document-share-button.tsx
  • 0f0c51a Merge branch 'main' into fix/2335-share-dialog-dropdown

📊 Changes

3 files changed (+36 additions, -13 deletions)

View changed files

📝 apps/remix/app/components/general/document/document-page-view-dropdown.tsx (+4 -2)
📝 apps/remix/app/components/tables/documents-table-action-dropdown.tsx (+4 -2)
📝 packages/ui/components/document/document-share-button.tsx (+28 -9)

📄 Description

Description

Fixes an issue where the “Share Signing Card” dialog immediately closes when triggered from dropdown menus.
The dialog now stays open as expected and closes the parent dropdown when the dialog is dismissed.

Additionally, improves the dialog title styling to better handle longer translations.

Changes Made

  • Added an optional onDialogClose hook in document-share-button.tsx and invoked it whenever the dialog closes
  • For dropdown-based triggers, kept manual open handling while allowing the dialog to close the parent dropdown via onDialogClose
  • Preserved existing behavior for the standalone button using DialogTrigger
  • Wired dropdown parents to close on dialog dismiss in:
    • documents-table-action-dropdown.tsx
    • document-page-view-dropdown.tsx
  • Updated DialogTitle styling with break-words text-lg font-semibold for improved i18n resilience

Testing Performed

  • Manually opened “Share Signing Card” from both dropdown entry points
  • Verified the dialog remains open while active and closes the dropdown after dismiss
  • Confirmed copy-link and tweet actions close the dialog and then the dropdown
  • Ran npm run build successfully

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/2350 **Author:** [@sarthakitaliya](https://github.com/sarthakitaliya) **Created:** 1/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/2335-share-dialog-dropdown` --- ### 📝 Commits (4) - [`6af0c1b`](https://github.com/documenso/documenso/commit/6af0c1b945c3dbbdb15027d313871dc516599e44) fix: prevent share dialog from closing when triggered via dropdown - [`e4bbb41`](https://github.com/documenso/documenso/commit/e4bbb4104d5566117043aec04b6619dc745d7067) fix: ensure dialog closes properly after share link actions - [`ff81ae1`](https://github.com/documenso/documenso/commit/ff81ae1fa0dccfe8dd959e74db336ee48f34d5d0) Update packages/ui/components/document/document-share-button.tsx - [`0f0c51a`](https://github.com/documenso/documenso/commit/0f0c51a37059de17ac4a2890260ff578522583ac) Merge branch 'main' into fix/2335-share-dialog-dropdown ### 📊 Changes **3 files changed** (+36 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `apps/remix/app/components/general/document/document-page-view-dropdown.tsx` (+4 -2) 📝 `apps/remix/app/components/tables/documents-table-action-dropdown.tsx` (+4 -2) 📝 `packages/ui/components/document/document-share-button.tsx` (+28 -9) </details> ### 📄 Description ## Description Fixes an issue where the **“Share Signing Card”** dialog immediately closes when triggered from dropdown menus. The dialog now stays open as expected and closes the parent dropdown when the dialog is dismissed. Additionally, improves the dialog title styling to better handle longer translations. ## Related Issue - Fixes #2335 ## Changes Made - Added an optional `onDialogClose` hook in `document-share-button.tsx` and invoked it whenever the dialog closes - For dropdown-based triggers, kept manual open handling while allowing the dialog to close the parent dropdown via `onDialogClose` - Preserved existing behavior for the standalone button using `DialogTrigger` - Wired dropdown parents to close on dialog dismiss in: - `documents-table-action-dropdown.tsx` - `document-page-view-dropdown.tsx` - Updated `DialogTitle` styling with `break-words text-lg font-semibold` for improved i18n resilience ## Testing Performed - Manually opened **“Share Signing Card”** from both dropdown entry points - Verified the dialog remains open while active and closes the dropdown after dismiss - Confirmed copy-link and tweet actions close the dialog and then the dropdown - Ran `npm run build` successfully ## Checklist - [x] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#2237
No description provided.