summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/message/message.scss
diff options
context:
space:
mode:
authorPierre Paridans <app@odoo.com>2020-10-08 13:54:36 +0000
committerPierre Paridans <app@odoo.com>2020-10-10 08:16:57 +0000
commit5e66ca8d2c970eed999782bdd59e9082f3967833 (patch)
tree0bcd9bac17fc4e9ef4c06f5e76de70242da32516 /addons/mail/static/src/components/message/message.scss
parentbc9b9695156a55747ddd9b1f2f29b1a18069b272 (diff)
[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@0e7e18ff71f3b490522358fa689ada7635dcd26a but a wrapper element (with the class `.o_thread_message_content`) was introduced in odoo/odoo@4685e4bc7f19f964697bf0dbd7dfdf254b6c5628 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#59689 X-original-commit: a8b64a74ef5575b783d1b314616f0a89bdce3732 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/message/message.scss')
-rw-r--r--addons/mail/static/src/components/message/message.scss5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/mail/static/src/components/message/message.scss b/addons/mail/static/src/components/message/message.scss
index 0b03a8ba835..8fe3d7a2219 100644
--- a/addons/mail/static/src/components/message/message.scss
+++ b/addons/mail/static/src/components/message/message.scss
@@ -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;
}