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.
This commit is contained in:
Halla Moore 2016-11-02 11:38:26 -07:00
parent 7865da6b7d
commit d996273b7b

View file

@ -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