fix(quoted-text): Correctly update container height

This commit is contained in:
Ben Gotow 2016-04-05 14:27:54 -07:00
parent 34201ff644
commit d1b1c5bea2
2 changed files with 14 additions and 7 deletions

View file

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

View file

@ -468,14 +468,18 @@ body.platform-win32 {
margin: 0 auto; margin: 0 auto;
padding: 0 20px @spacing-standard 20px; padding: 0 20px @spacing-standard 20px;
.iframe-container {
margin-top: 10px;
width: 100%;
iframe { iframe {
width: 100%; width: 100%;
border: 0; border: 0;
padding: 0; padding: 0;
margin-top: 10px;
overflow: auto; overflow: auto;
} }
} }
}
.collapse-region { .collapse-region {
width: calc(~"100% - 30px"); width: calc(~"100% - 30px");