insert link inserts the link not at the cursor position but at the front #121

Closed
opened 2026-08-01 11:31:13 +00:00 by hugo · 1 comment
Owner

this might be because the link insert is a button and to click it the focus jumps out of the text area, but the inserted link is supposed to land where the cursor was last in the text area and not just put in Front of the text.

this might be because the link insert is a button and to click it the focus jumps out of the text area, but the inserted link is supposed to land where the cursor was last in the text area and not just put in Front of the text.
hugo added the bugcritical labels 2026-08-01 11:31:13 +00:00
Author
Owner

Implemented in a74165f.

The post editor now captures its cursor and selection before opening the link or media picker, carries that insertion point through picker searches and tab changes, and restores it before inserting Markdown. This fixes internal links, external links, newly created post links, and media insertions through the shared modal path while preserving direct live-cursor insertion.

Verification:

  • Red/green regression reproduces focus resetting the live cursor to the document start and proves insertion still occurs at the saved position.
  • Targeted post-editor and app tests pass.
  • Allium check and analyse pass; neutral comparison confirms the modals and post-editor insert-at-cursor rules are met.
  • bDS2 comparison confirms equivalent selection-preserving insertion behavior.
  • cargo fmt, check, clippy -D warnings, build, and cargo test --workspace pass.
  • Release bundle built with cargo bundle-macos and the exact repository app opened and exercised with Computer Use; the link picker was cancelled without modifying user content.
Implemented in a74165f. The post editor now captures its cursor and selection before opening the link or media picker, carries that insertion point through picker searches and tab changes, and restores it before inserting Markdown. This fixes internal links, external links, newly created post links, and media insertions through the shared modal path while preserving direct live-cursor insertion. Verification: - Red/green regression reproduces focus resetting the live cursor to the document start and proves insertion still occurs at the saved position. - Targeted post-editor and app tests pass. - Allium check and analyse pass; neutral comparison confirms the modals and post-editor insert-at-cursor rules are met. - bDS2 comparison confirms equivalent selection-preserving insertion behavior. - cargo fmt, check, clippy -D warnings, build, and cargo test --workspace pass. - Release bundle built with cargo bundle-macos and the exact repository app opened and exercised with Computer Use; the link picker was cancelled without modifying user content.
hugo closed this issue 2026-08-01 17:50:59 +00:00
Sign in to join this conversation.