fix(ui): save input on blur in link editor + alt text editor#8037
Merged
mimecuvalo merged 4 commits intomainfrom Feb 23, 2026
Merged
fix(ui): save input on blur in link editor + alt text editor#8037mimecuvalo merged 4 commits intomainfrom
mimecuvalo merged 4 commits intomainfrom
Conversation
Clicking outside the rich text link editor now saves the current link value instead of discarding it. Uses a ref guard to prevent double-saves since Enter triggers both blur and onComplete. Closes #7673
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
MitjaBezensek
approved these changes
Feb 20, 2026
| handleRemoveLink() | ||
| } | ||
| } | ||
| document.addEventListener('pointerdown', handlePointerDown, { capture: true }) |
Contributor
There was a problem hiding this comment.
Think we now set these up on every keypress since value is a dependency. We could store it in a separate ref?
Member
Author
There was a problem hiding this comment.
ehh, i dunno, it's cheap to set/unset it. i'd rather not add a cached value in a ref. easy for it to get out-of-sync
steveruizok
added a commit
that referenced
this pull request
Feb 27, 2026
Add 12 new entries from PRs merged since v4.4.0: - Featured: click-through on transparent image pixels (#7942) - API: enum-to-const-object refactor (#8084) - Improvements: SVG sanitizer (#7896), save-on-blur (#8037) - Bug fixes: cross-origin download (#8090), zero-size draw (#8067), rich text toolbar cleanup (#8050), zoom threshold (#8040), selection foreground fallback (#8011), sticky note SVG shadow (#7934), arrow frame clamping (#7932), zero pressure draw (#5693)
3 tasks
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.
In order to prevent users from accidentally losing their link edits when clicking outside the rich text link editor and alt text editor, this PR makes clicking away save the current value instead of discarding it. Closes #7673.
Change type
improvementTest plan
example.com)Release notes
Note
Medium Risk
Adds global
pointerdownhandlers that auto-commit edits; mistakes here could cause unintended saves or event ordering issues in the UI, though scope is limited to toolbar editors.Overview
Prevents losing edits in the rich-text link editor and media alt-text editor by auto-saving on click-away: both
LinkEditorandAltTextEditornow listen forpointerdownoutside their respective toolbars and commit the current value (or remove the link if empty).To support this, image/video toolbars share a new
.tlui-media__toolbarclass used for outside-click detection, and an e2e test is added to verify a link is saved when the user clicks outside the link input without pressing Enter.Written by Cursor Bugbot for commit 9773390. This will update automatically on new commits. Configure here.