diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index 087859e89..d1afed204 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -352,17 +352,6 @@ button.comment__action-button[disabled], /* Flag Styles */ -.coral-plugin-flags-container { - position: relative; -} - -.coral-plugin-flags-popup span { - min-width: 280px; - bottom: 36px; - position: absolute; - right: 10px; -} - .coral-plugin-flags-popup-form { margin-bottom: 10px; } @@ -399,6 +388,7 @@ button.comment__action-button[disabled], margin-top: 5px; width: 75%; font-size: 16px; + border: 1px solid #ccc; } /* Close comments */ diff --git a/client/coral-plugin-flags/FlagButton.js b/client/coral-plugin-flags/FlagButton.js index 16e616379..e5daf72c9 100644 --- a/client/coral-plugin-flags/FlagButton.js +++ b/client/coral-plugin-flags/FlagButton.js @@ -19,6 +19,12 @@ class FlagButton extends Component { localDelete: false } + componentDidUpdate () { + if (this.popup) { // this will be defined when the reporting popup is opened + this.popup.firstChild.style.top = `${this.flagButton.offsetTop - this.popup.firstChild.clientHeight - 15}px`; + } + } + // When the "report" button is clicked expand the menu onReportClick = () => { const {currentUser, deleteAction, flaggedByCurrentUser, flag} = this.props; @@ -135,7 +141,10 @@ class FlagButton extends Component { const popupMenu = getPopupMenu[this.state.step](this.state.itemType); return