diff --git a/src/react-sane-contenteditable.js b/src/react-sane-contenteditable.js index e9fa892..b35732a 100644 --- a/src/react-sane-contenteditable.js +++ b/src/react-sane-contenteditable.js @@ -53,10 +53,11 @@ class ContentEditable extends Component { }; this.ref = null; - this.selection = document.getSelection(); } componentDidMount() { + this.selection = document.getSelection(); + const { focus } = this.props; if (focus && this.ref) {