fix(webui): prevent inline code from breaking mid-token on copy/paste

The parent `.chat-text` applies `overflow-wrap: anywhere; word-break: break-word;`
which forces long tokens (UUIDs, hashes) inside inline `<code>` to break across
visual lines. When copied, the browser injects spaces at those break points,
corrupting the pasted value.

Override with `overflow-wrap: normal; word-break: keep-all;` on inline `<code>`
selectors so tokens stay intact.

Fixes #32230

Signed-off-by: HCL <chenglunhu@gmail.com>
This commit is contained in:
HCL
2026-03-03 08:40:35 +08:00
committed by Peter Steinberger
parent 7dadd5027b
commit 7c90ef7c52
2 changed files with 4 additions and 0 deletions

View File

@@ -60,6 +60,8 @@
background: rgba(0, 0, 0, 0.15);
padding: 0.15em 0.4em;
border-radius: 4px;
overflow-wrap: normal;
word-break: keep-all;
}
.chat-text :where(pre) {

View File

@@ -1895,6 +1895,8 @@
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--secondary);
overflow-wrap: normal;
word-break: keep-all;
}
:root[data-theme="light"] .chat-text :where(:not(pre) > code) {