fix(quoted-text): Correctly update container height

This commit is contained in:
Ben Gotow 2016-04-05 14:27:54 -07:00
parent e58014a478
commit afd8304359
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,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;
}
} }
} }