[FIX] mail: plain-text messages word-wrap in Discuss UI

When a user sends a plaintext email to a mail-enabled channel, the
rendering of this message in Discuss have present a horizontal scroll
when the text contains long sentences.

This commit fixes it by enabling wrapping of the line's word to fit its
container size and prevent horizontal scrolling.

Note: the required CSS rules were already present since odoo/odoo@0e7e18ff71
but a wrapper element (with the class `.o_thread_message_content`) was
introduced in odoo/odoo@4685e4bc7f and
merged between the testing of the fix above and its actual merging in the
Odoo codebase, making it ineffective. We only have to properly re-enable
it.

opw-2341485

Related task ID: 34931

closes odoo/odoo#59719

X-original-commit: 5e66ca8d2c970eed999782bdd59e9082f3967833
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
Pierre Paridans
2020-10-12 08:42:49 +00:00
parent ae83889da4
commit a84e37bb8a
2 changed files with 6 additions and 2 deletions
@@ -48,6 +48,11 @@
// the style without this rule.
overflow: auto;
> pre {
white-space: pre-wrap;
word-break: break-word;
}
> p:last-of-type {
margin-bottom: 0;
}
+1 -2
View File
@@ -84,10 +84,9 @@
min-width: 0;
max-width: 100%;
word-wrap: break-word;
> pre {
.o_thread_message_content > pre {
white-space: pre-wrap;
word-break: break-word;
text-align: justify;
}
.o_mail_note_title {