Skip to content

Share dialog does not auto-close after sharing or clicking outside #5049

Description

@Lucas-Fong

Share dialog does not auto-close after sharing or clicking outside

Bug Description

The "Share Content" (分享内容) modal dialog does not automatically dismiss in the following scenarios:

  1. Clicking outside the modal (on the overlay/backdrop) — the dialog stays open.
  2. After performing a share action — e.g. clicking "Copy Link" (复制链接) or "System Share" (系统分享), the dialog remains open instead of closing to confirm the action succeeded.

The user is forced to manually click the close (X) button every time.

Steps to Reproduce

  1. Open any entry/article in Folo.
  2. Click the share button to open the "Share Content" (分享内容) dialog.
  3. Do either of the following:
    • (a) Click on the backdrop / area outside the dialog, or
    • (b) Click "Copy Link" (复制链接) or "System Share" (系统分享).
  4. Observe that the dialog stays open.

Expected Behavior

  • Clicking outside the modal should close it (standard modal interaction).
  • After a share action completes (especially "Copy Link"), the modal should auto-close to give clear feedback that the action succeeded.

Actual Behavior

  • The modal remains open in both scenarios.
  • The user must manually click the X button to dismiss it.

Screenshot

See attached screenshot — the share dialog stays open after interacting with it.

Environment

  • OS: macOS
  • Date observed: 2026-07-19

Suggested Fix

The share modal component likely needs:

  1. An onInteractOutside / onPointerDownOutside handler that calls the close handler (if built on Radix Dialog / Popover).
  2. An onShareComplete callback invoked after each share action (copy link, system share, social share) that triggers onOpenChange(false) / setOpen(false).

This would bring the share dialog in line with standard modal UX and improve perceived responsiveness of share actions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions