diff --git a/src/TextAnnotator.jsx b/src/TextAnnotator.jsx index 2a26a33..9d85358 100644 --- a/src/TextAnnotator.jsx +++ b/src/TextAnnotator.jsx @@ -70,7 +70,10 @@ export default class TextAnnotator extends Component { }, () => this.setState({ selectedAnnotation: selection, selectedDOMElement: element - })) + })); + + if (!selection.isSelection) + this.props.onAnnotationSelected(selection.clone()); } else { this.clearState(); }