mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-20 22:23:53 +08:00
fix(email-frame): Prioritize documentElement for scroll height
This commit is contained in:
parent
ff2e626037
commit
e1a5e6e1ea
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue