diff --git a/src/renderer/extensions/vueNodes/composables/useVueNodeResizeTracking.ts b/src/renderer/extensions/vueNodes/composables/useVueNodeResizeTracking.ts index a25d297d9..e3ca8ff9e 100644 --- a/src/renderer/extensions/vueNodes/composables/useVueNodeResizeTracking.ts +++ b/src/renderer/extensions/vueNodes/composables/useVueNodeResizeTracking.ts @@ -86,16 +86,15 @@ const resizeObserver = new ResizeObserver((entries) => { if (!elementType || !elementId) continue - // Use borderBoxSize to match getBoundingClientRect() and element.style.width/height - // This ensures consistency with manual resize operations - const borderBox = Array.isArray(entry.borderBoxSize) - ? entry.borderBoxSize[0] - : (entry.contentBoxSize?.[0] ?? { + // Use contentBoxSize when available; fall back to contentRect for older engines/tests + const contentBox = Array.isArray(entry.contentBoxSize) + ? entry.contentBoxSize[0] + : { inlineSize: entry.contentRect.width, blockSize: entry.contentRect.height - }) - const width = borderBox.inlineSize - const height = borderBox.blockSize + } + const width = contentBox.inlineSize + const height = contentBox.blockSize // Screen-space rect const rect = element.getBoundingClientRect()