From 4c5e102095ad97ed4d9900ca13358c593adcad69 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Wed, 3 Jun 2020 15:34:52 +0200 Subject: [PATCH] Another attempt at getting ResizeObserver behavior right --- src/editor/Editor.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index 6e0186b..15f135d 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -51,7 +51,7 @@ const Editor = props => { props.onAnnotationCreated(annotation.toAnnotation()); if (element.current) { - setPosition(props.wrapperEl, element.current, props.selectedElement); + // Note that ResizeObserver fires once when observation starts return initResizeObserver(); } }, [ props.selectedElement, bounds(props.selectedElement) ]);