Skip to content

Clicking outside link edit dialog should save instead of cancel #7673

@steveruizok

Description

@steveruizok

Summary

When editing a link (either on a shape via the Edit Link dialog or in rich text), clicking outside the dialog/input should save the current link value and close, rather than canceling and discarding changes.

Current behavior

  1. Select a shape with a URL property (e.g., geo shape)
  2. Open the "Edit link" dialog
  3. Enter or modify a URL
  4. Click on the canvas background (outside the dialog)
  5. Result: The dialog closes and changes are discarded

The same behavior occurs for the rich text link editor - clicking outside cancels instead of saving.

Expected behavior

Clicking outside the dialog should be treated as "accept and continue" - the current link value should be saved before closing. This matches common UI patterns where clicking away from an input field typically confirms the change rather than canceling it.

Use case

Users often click away from dialogs/inputs as a natural way to "finish" editing, expecting their changes to be saved. Having to explicitly click "Save" or press Enter is less intuitive, and accidentally clicking outside results in lost work.

Metadata

Metadata

Assignees

Labels

improvementProduct improvementsdkAffects the tldraw sdk

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions