fix(email-frame): Prioritize documentElement for scroll height

This commit is contained in:
Jackie Luo 2016-11-02 15:28:18 -07:00
parent ff2e626037
commit e1a5e6e1ea

View file

@ -110,11 +110,13 @@ export default class EmailFrame extends React.Component {
if (style.height === '0px') {
doc.body.style.height = "auto"
}
height = doc.body.scrollHeight;
}
if (doc && doc.documentElement) {
height = Math.max(height, doc.documentElement.scrollHeight);
height = doc.documentElement.scrollHeight;
console.log("documentElement.scrollHeight = " + doc.documentElement.scrollHeight)
} else {
height = doc.body.scrollHeight;
}
// scrollHeight does not include space required by scrollbar