diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index 70e043e..0125adb 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -18,11 +18,12 @@ const Editor = props => { // Re-render: set derived annotation state & position the editor useEffect(() => { - setCurrentAnnotation(props.annotation); + if (!currentAnnotation?.isEqual(props.annotation)) + setCurrentAnnotation(props.annotation); if (element.current) setPosition(props.wrapperEl, element.current, props.bounds); - }, [ props.annotation, props.bounds ]); + }, [ props.bounds ]); const onAppendBody = body => setCurrentAnnotation( currentAnnotation.clone({