Skip to content

Commit a6ca25e

Browse files
committed
Fix user message overflow detection on share page
Replace CSS line-clamp with max-height to enable proper overflow detection. The createOverflow function uses scrollHeight > clientHeight to detect when content overflows, but line-clamp doesn't create scrollable overflow. This caused expand button to never appear for truncated user messages. Changes: - Replace -webkit-line-clamp:3 with max-height: calc(1.5em * 3) - Update expanded state to use max-height: none and overflow: visible Note: This fix is targeted specifically to user messages on share page.
1 parent a1c0bae commit a6ca25e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

packages/web/src/components/share/content-text.module.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@
2121
line-height: 1.5;
2222
white-space: pre-wrap;
2323
overflow-wrap: anywhere;
24-
display: -webkit-box;
25-
-webkit-box-orient: vertical;
26-
-webkit-line-clamp: 3;
27-
line-clamp: 3;
24+
max-height: calc(1.5em * 3); /* 3 lines at 1.5 line-height */
2825
overflow: hidden;
2926

3027
[data-expanded] & {
31-
display: block;
28+
max-height: none;
29+
overflow: visible;
3230
}
3331
}
3432

0 commit comments

Comments
 (0)