From c5e85dc4a1eeb0bcc6c61bf08a56ce57340bd1f5 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Fri, 1 Dec 2017 18:55:09 -0800 Subject: [PATCH] Fix issue with nested vertical scrollbars in messages --- app/internal_packages/message-list/lib/email-frame.jsx | 5 +++-- app/static/email-frame.less | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/internal_packages/message-list/lib/email-frame.jsx b/app/internal_packages/message-list/lib/email-frame.jsx index d4e18eeb1..01cb6a85f 100644 --- a/app/internal_packages/message-list/lib/email-frame.jsx +++ b/app/internal_packages/message-list/lib/email-frame.jsx @@ -130,8 +130,9 @@ export default class EmailFrame extends React.Component { height = doc.body.scrollHeight; } - // scrollHeight does not include space required by scrollbar - return height + 25; + // scrollHeight does not include space required by horizontal scrollbar + // if it's present. + return height + 18; }; _setFrameHeight = () => { diff --git a/app/static/email-frame.less b/app/static/email-frame.less index fb2700a32..7cac40260 100644 --- a/app/static/email-frame.less +++ b/app/static/email-frame.less @@ -57,6 +57,7 @@ margin: 0; padding: 0; overflow-x: auto; + overflow-y: hidden; -webkit-text-size-adjust: auto; word-wrap: break-word; @@ -82,7 +83,6 @@ padding: 0; margin: auto; max-width: 840px; - overflow-y: hidden; word-break: break-word; -webkit-font-smoothing: antialiased; } @@ -102,10 +102,6 @@ border-bottom: 0; } - body.heightDetermined { - overflow-y: hidden; - } - div, pre { max-width: 100%;