Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions desktop/src/shared/styles/globals/markdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,25 @@
}

.message-markdown .agent-mention-at-hidden {
display: inline-block;
width: 0;
max-width: 0;
overflow: hidden;
/* Collapse the literal "@" to zero advance width WITHOUT using a
zero-width `inline-block` box. WebKitGTK (the Tauri webview on Linux)
mis-measures the caret rect for a text position adjacent to a
collapsed `inline-block`: it snaps the caret to the box's content
origin, which — because the following agent chip carries left padding
for its bot icon — renders the caret visually *inside* the chip
(e.g. "F|izz") even though the ProseMirror selection is correctly
after the whole mention. Hiding the "@" as plain inline text via
`font-size: 0` keeps zero advance width while leaving the caret on
the normal inline text path, which WebKit positions correctly.
`inline` (not `inline-block`) is essential to the fix. */
display: inline;
font-size: 0;
line-height: inherit;
opacity: 0;
padding: 0;
margin: 0;
border: 0;
vertical-align: baseline;
line-height: 1;
}

.message-markdown .agent-mention-highlight {
Expand Down
Binary file added pr-5235--mention-caret-fix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.