From 6fe8623ed82e887863cfcb7f6ffe51548c1fe4ed Mon Sep 17 00:00:00 2001 From: betterdancing Date: Thu, 30 Oct 2025 19:40:22 -0700 Subject: [PATCH 1/2] fix/element-not-found --- packages/canvas/container/src/container.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/canvas/container/src/container.ts b/packages/canvas/container/src/container.ts index 9a5fc88e58..37f0f5fd05 100644 --- a/packages/canvas/container/src/container.ts +++ b/packages/canvas/container/src/container.ts @@ -468,9 +468,12 @@ const setSelectRect = ( const getElementDurationTime = (elementId?: string) => { const element = elementId ? querySelectById(elementId) : getDocument().body + let delayTime = 50 + if (!element) { + return delayTime + } const transitionDuration = window.getComputedStyle(element).getPropertyValue('transition-duration') const transitionDelay = window.getComputedStyle(element).getPropertyValue('transition-delay') - let delayTime = 0 const getMaxMillisecondNumber = (arr: string[]) => { const millisecondNumber = arr.map((item) => { const unit = item.slice(-2) From c335dd415791d659e7342a25ba37d34e18b2f609 Mon Sep 17 00:00:00 2001 From: betterdancing Date: Thu, 30 Oct 2025 20:01:46 -0700 Subject: [PATCH 2/2] fix/element-not-found --- packages/canvas/container/src/container.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/canvas/container/src/container.ts b/packages/canvas/container/src/container.ts index 37f0f5fd05..23bbfe80be 100644 --- a/packages/canvas/container/src/container.ts +++ b/packages/canvas/container/src/container.ts @@ -494,7 +494,7 @@ const getElementDurationTime = (elementId?: string) => { const transitionDelays = transitionDelay.split(',') delayTime += getMaxMillisecondNumber(transitionDelays) } - return delayTime === 0 ? 300 : delayTime + return delayTime } export const updateRect = (id?: string) => {