diff --git a/services/web/frontend/js/features/source-editor/components/review-panel/positioned-entries.tsx b/services/web/frontend/js/features/source-editor/components/review-panel/positioned-entries.tsx index adcbea387a..e26cbf0a64 100644 --- a/services/web/frontend/js/features/source-editor/components/review-panel/positioned-entries.tsx +++ b/services/web/frontend/js/features/source-editor/components/review-panel/positioned-entries.tsx @@ -210,6 +210,10 @@ function PositionedEntries({ const { reviewPanelOpen } = useLayoutContext() const previousLayoutInfoRef = useRef(initialLayoutInfo) + const resetLayout = () => { + previousLayoutInfoRef.current = initialLayoutInfo + } + const layout = (animate = true) => { const container = containerRef.current if (!container) { @@ -273,6 +277,7 @@ function PositionedEntries({ } if (entryViews.length === 0) { + resetLayout() return }