Another attempt at getting ResizeObserver behavior right

This commit is contained in:
Rainer Simon 2020-06-03 15:34:52 +02:00
parent 7bf430f15c
commit 4c5e102095
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ const Editor = props => {
props.onAnnotationCreated(annotation.toAnnotation()); props.onAnnotationCreated(annotation.toAnnotation());
if (element.current) { if (element.current) {
setPosition(props.wrapperEl, element.current, props.selectedElement); // Note that ResizeObserver fires once when observation starts
return initResizeObserver(); return initResizeObserver();
} }
}, [ props.selectedElement, bounds(props.selectedElement) ]); }, [ props.selectedElement, bounds(props.selectedElement) ]);