From f5ff0b1b30dcaa332bcfee12d8218e41d008e912 Mon Sep 17 00:00:00 2001 From: "Didier (did)" Date: Wed, 19 Apr 2023 07:26:59 +0000 Subject: [PATCH] [FIX] mail: fix link preview overflow in the chat window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this PR, a link preview image would overflow out of the chat window. This because the max-width on the image is bigger than the space dedicated to the image inside the chat window. This PR set the max-width to 100% inside a chat window, so the image cover the space nicely. closes odoo/odoo#119019 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/core_ui/link_preview/link_preview.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mail/static/src/core_ui/link_preview/link_preview.scss b/addons/mail/static/src/core_ui/link_preview/link_preview.scss index aa0839d0eda..b4337ad2724 100644 --- a/addons/mail/static/src/core_ui/link_preview/link_preview.scss +++ b/addons/mail/static/src/core_ui/link_preview/link_preview.scss @@ -17,7 +17,7 @@ .o-mail-LinkPreviewImage img { max-height: $o-mail-LinkPreview-height; - max-width: $o-mail-LinkPreview-width; + max-width: Min($o-mail-LinkPreview-width, 100%); } .o-mail-LinkPreviewVideo {