Skip to content

Commit 3d5db7b

Browse files
committed
fix message bubble overflows due to code and pre blocks
1 parent dc14e80 commit 3d5db7b

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

frontend/src/assets/styles/main.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,17 @@
166166

167167
.message-bubble {
168168
@apply flex flex-col px-4 pt-2 pb-3 w-fit min-w-[30%] max-w-full border overflow-x-auto rounded shadow-sm;
169+
overflow-wrap: break-all;
170+
171+
* {
172+
max-width: 100%;
173+
}
174+
175+
// Force pre blocks to wrap
176+
pre, code {
177+
white-space: pre-wrap;
178+
}
179+
169180
table {
170181
width: 100% !important;
171182
table-layout: fixed !important;

frontend/src/features/conversation/message/ContactMessageBubble.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<!-- Message Text -->
3434
<div
3535
v-if="message.content_type === 'text'"
36-
class="mb-1 native-html break-all whitespace-pre-wrap"
36+
class="mb-1 native-html whitespace-pre-wrap"
3737
:class="{ 'mb-3': message.attachments.length > 0 }"
3838
>
3939
{{ sanitizedMessageContent }}
@@ -42,7 +42,7 @@
4242
v-else
4343
:html="sanitizedMessageContent"
4444
:allowedSchemas="['cid', 'https', 'http', 'mailto']"
45-
class="mb-1 native-html break-all"
45+
class="mb-1 native-html"
4646
:class="{ 'mb-3': message.attachments.length > 0 }"
4747
/>
4848

0 commit comments

Comments
 (0)