mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Scope message handler to confirmation iframe
This commit is contained in:
parent
3b729fcb0a
commit
2eb63e604d
1 changed files with 4 additions and 3 deletions
|
@ -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,7 +300,7 @@ var Splash = injectIntl(React.createClass({
|
|||
isOpen={this.state.emailConfirmationModalOpen}
|
||||
onRequestClose={this.hideEmailConfirmationModal}
|
||||
style={{content: emailConfirmationStyle}}>
|
||||
<iframe
|
||||
<iframe ref="emailConfirmationiFrame"
|
||||
src="/accounts/email_resend_standalone/"
|
||||
{...omit(emailConfirmationStyle, 'padding')} />
|
||||
</Modal>
|
||||
|
|
Loading…
Reference in a new issue