From d243b5dad7c54b544a51526ef9dd4c432f54b749 Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Thu, 6 Dec 2018 15:06:21 -0500 Subject: [PATCH] Allow the iframe to close the parent admin panel --- src/views/preview/project-view.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/views/preview/project-view.jsx b/src/views/preview/project-view.jsx index 6cf8ba506..70e1ba6cb 100644 --- a/src/views/preview/project-view.jsx +++ b/src/views/preview/project-view.jsx @@ -282,6 +282,8 @@ class Preview extends React.Component { adminModalOpen: false }); } + if (messageEvent.data === 'openPanel') this.handleOpenAdminPanel(); + if (messageEvent.data === 'closePanel') this.handleCloseAdminPanel(); } handleReportComment (id, topLevelCommentId) { this.props.handleReportComment(this.state.projectId, id, topLevelCommentId, this.props.user.token);