diff --git a/src/components/contextmenu/ContextMenu.js b/src/components/contextmenu/ContextMenu.js index ba59e5c617..027eb5957c 100644 --- a/src/components/contextmenu/ContextMenu.js +++ b/src/components/contextmenu/ContextMenu.js @@ -469,9 +469,6 @@ export class ContextMenu extends Component { render() { const element = this.renderContextMenu(); - if (this.props.appendTo) - return ReactDOM.createPortal(element, this.props.appendTo); - else - return element; + return ReactDOM.createPortal(element, this.props.appendTo || document.body); } }