Skip to content

fix: place cursor at clicked pos inside tracked change#2855

Open
artem-harbour wants to merge 1 commit intomainfrom
artem/SD-2612
Open

fix: place cursor at clicked pos inside tracked change#2855
artem-harbour wants to merge 1 commit intomainfrom
artem/SD-2612

Conversation

@artem-harbour
Copy link
Copy Markdown
Contributor

@artem-harbour artem-harbour commented Apr 17, 2026

Linear: SD-2612

Fix caret placement inside tracked-change text on click.

This updates EditorInputManager to treat direct clicks on tracked-change spans the same way we already treat direct single-thread comment highlights (SD-2442): do not short-circuit to setCursorById, and let normal click-to-position place the caret at the clicked location.

Also fixes repeat-click behavior so subsequent direct clicks inside the same tracked change continue to reposition the caret instead of being ignored by the active-thread repeat-click guard.

Includes unit test updates in EditorInputManager.activeCommentClick.test.ts to cover:

  • direct tracked-change click falls through to generic caret placement
  • repeat direct click on active tracked change still repositions caret

@artem-harbour artem-harbour self-assigned this Apr 17, 2026
@linear
Copy link
Copy Markdown

linear bot commented Apr 17, 2026

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants