Skip to content

fix: let links inside a comment stay clickable when displayCommentAsIcon is on (#90)#375

Merged
JohnMcLear merged 1 commit intomainfrom
fix/displayCommentAsIcon-allow-url-clicks
Apr 17, 2026
Merged

fix: let links inside a comment stay clickable when displayCommentAsIcon is on (#90)#375
JohnMcLear merged 1 commit intomainfrom
fix/displayCommentAsIcon-allow-url-clicks

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Fixes #90. With displayCommentAsIcon: true, the comment is opened by clicking the gutter icon — the inline .comment span in the pad should behave like ordinary prose so that links inside a commented selection remain clickable. The click handler was popping up the comment modal at the click position regardless, intercepting every link click. Early-return from the handler when icon mode is on; mouseover preview and icon-based open flow are untouched.

With \`displayCommentAsIcon: true\` the comment is opened by clicking
the icon in the gutter. The inline \`.comment\` span in the pad should
then behave like ordinary prose so that links inside commented text
remain clickable. The click handler on \`.comment\` was unconditionally
popping up a comment modal at the click position, which intercepted
every link click and made URLs unreachable (reporter's original symptom
in #90).

Early-return from the \`.comment\` click handler when
\`clientVars.displayCommentAsIcon\` is true. Mouseover preview and the
icon-based open flow are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JohnMcLear JohnMcLear merged commit 8eb04df into main Apr 17, 2026
2 checks passed
@JohnMcLear JohnMcLear deleted the fix/displayCommentAsIcon-allow-url-clicks branch April 17, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URLs cannot be clicked using "displayCommentAsIcon"

1 participant