Scope message handler to confirmation iframe

This commit is contained in:
Ray Schamp 2015-10-25 12:06:34 -04:00
parent 3b729fcb0a
commit 2eb63e604d

View file

@ -70,6 +70,7 @@ var Splash = injectIntl(React.createClass({
},
onMessage: function (e) {
if (e.origin != window.location.origin) return;
if (e.source != this.refs.emailConfirmationiFrame.contentWindow) return;
if (e.data == 'resend-done') {
this.hideEmailConfirmationModal();
} else {
@ -299,9 +300,9 @@ var Splash = injectIntl(React.createClass({
isOpen={this.state.emailConfirmationModalOpen}
onRequestClose={this.hideEmailConfirmationModal}
style={{content: emailConfirmationStyle}}>
<iframe
src="/accounts/email_resend_standalone/"
{...omit(emailConfirmationStyle, 'padding')} />
<iframe ref="emailConfirmationiFrame"
src="/accounts/email_resend_standalone/"
{...omit(emailConfirmationStyle, 'padding')} />
</Modal>
] : []}
<div key="inner" className="inner">