diff --git a/components/Carbon.js b/components/Carbon.js index 764e7bb..8dc1d07 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -307,6 +307,11 @@ class Carbon extends React.PureComponent { ) + const selectionNode = + !this.props.readOnly && + !!this.state.selectionAt && + document.getElementById('style-editor-button') + return (
{content}
- {!this.props.readOnly && - this.state.selectionAt && + {selectionNode && ReactDOM.createPortal( , // TODO: don't use portal? - document.getElementById('style-editor-button') + selectionNode )}