mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
fix(quoted-text): Correctly update container height
This commit is contained in:
parent
e58014a478
commit
afd8304359
2 changed files with 14 additions and 7 deletions
|
@ -113,7 +113,7 @@ export default class EmailFrame extends React.Component {
|
||||||
// This is a hack, but I'm not sure of a better solution.
|
// This is a hack, but I'm not sure of a better solution.
|
||||||
if (Math.abs(height - this._lastComputedHeight) > 5) {
|
if (Math.abs(height - this._lastComputedHeight) > 5) {
|
||||||
this.refs.iframe.setHeightQuietly(height);
|
this.refs.iframe.setHeightQuietly(height);
|
||||||
holderNode.height = `${height}px`;
|
holderNode.style.height = `${height}px`;
|
||||||
this._lastComputedHeight = height;
|
this._lastComputedHeight = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,10 @@ export default class EmailFrame extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div ref="iframeHeightHolder" style={{height: this._lastComputedHeight}}>
|
<div
|
||||||
|
className="iframe-container"
|
||||||
|
ref="iframeHeightHolder"
|
||||||
|
style={{height: this._lastComputedHeight}}>
|
||||||
<EventedIFrame
|
<EventedIFrame
|
||||||
ref="iframe"
|
ref="iframe"
|
||||||
seamless="seamless"
|
seamless="seamless"
|
||||||
|
|
|
@ -468,12 +468,16 @@ body.platform-win32 {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0 20px @spacing-standard 20px;
|
padding: 0 20px @spacing-standard 20px;
|
||||||
|
|
||||||
iframe {
|
.iframe-container {
|
||||||
width: 100%;
|
|
||||||
border: 0;
|
|
||||||
padding: 0;
|
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
overflow: auto;
|
width: 100%;
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
width: 100%;
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue