From 573cc1e98e1358897fa1154f599b0ed27f15809b Mon Sep 17 00:00:00 2001 From: ziimakc Date: Tue, 28 Jul 2026 21:58:48 +0300 Subject: [PATCH] fix: swallow canceled Animation.finished rejections in use_animated_open When the element bound to use_animated_open is removed from the DOM (or its animation/transition is otherwise canceled) before finishing naturally, each canceled animation's `finished` promise rejects with a DOMException (AbortError), which surfaces as an unhandled promise rejection since Promise.all(...).then(...) has no catch handler. --- primitives/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index 1eb60c9bf..ee9e576a1 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -262,7 +262,7 @@ fn use_animated_open( "const id = await dioxus.recv(); const element = document.getElementById(id); if (element && element.getAnimations().length > 0) { - Promise.all(element.getAnimations().map((animation) => animation.finished)).then(() => { + Promise.all(element.getAnimations().map((animation) => animation.finished.catch(() => {}))).then(() => { dioxus.send(true); }); } else {