fix copy text from embed bug

Closes #972
main
Mike Fix 5 years ago
parent 30a73d098c
commit 1acbdf0529
No known key found for this signature in database
GPG Key ID: 1D85E862314CA79F

@ -307,6 +307,11 @@ class Carbon extends React.PureComponent {
</div> </div>
) )
const selectionNode =
!this.props.readOnly &&
!!this.state.selectionAt &&
document.getElementById('style-editor-button')
return ( return (
<div className="section"> <div className="section">
<div <div
@ -318,12 +323,11 @@ class Carbon extends React.PureComponent {
<SpinnerWrapper loading={this.props.loading}>{content}</SpinnerWrapper> <SpinnerWrapper loading={this.props.loading}>{content}</SpinnerWrapper>
<div className="twitter-png-fix" /> <div className="twitter-png-fix" />
</div> </div>
{!this.props.readOnly && {selectionNode &&
this.state.selectionAt &&
ReactDOM.createPortal( ReactDOM.createPortal(
<SelectionEditor onChange={this.onSelectionChange} />, <SelectionEditor onChange={this.onSelectionChange} />,
// TODO: don't use portal? // TODO: don't use portal?
document.getElementById('style-editor-button') selectionNode
)} )}
<style jsx> <style jsx>
{` {`

Loading…
Cancel
Save