From d996273b7bcb943b7059fb49cc9b7e8616290935 Mon Sep 17 00:00:00 2001 From: Halla Moore Date: Wed, 2 Nov 2016 11:38:26 -0700 Subject: [PATCH] fix(email-frame) Only use documentElement scrollHeight if it is taller than body There are cases where the documentElement has a scrollHeight of 0, even if the body has a larger scrollHeight. Before, we were always using the documentElement if it was present. Now, we use the maximum scrollHeight. --- internal_packages/message-list/lib/email-frame.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal_packages/message-list/lib/email-frame.jsx b/internal_packages/message-list/lib/email-frame.jsx index 30aee531e..9d6813701 100644 --- a/internal_packages/message-list/lib/email-frame.jsx +++ b/internal_packages/message-list/lib/email-frame.jsx @@ -114,7 +114,7 @@ export default class EmailFrame extends React.Component { } if (doc && doc.documentElement) { - height = doc.documentElement.scrollHeight; + height = Math.max(height, doc.documentElement.scrollHeight); } // scrollHeight does not include space required by scrollbar