From c9f480324f705e4218d0d1e71421d8108494a4d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 28 Apr 2024 13:52:25 +0000 Subject: [PATCH 1/2] Update to upstream @floating-ui/dom@1.6.4 --- upstream.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upstream.toml b/upstream.toml index 96cf58e..ef217af 100644 --- a/upstream.toml +++ b/upstream.toml @@ -1,5 +1,5 @@ [releases] core = "1.6.0" -dom = "1.6.3" +dom = "1.6.4" utils = "0.2.1" vue = "1.0.6" From 2bfe71aec33f9fd7e9888723dd4fc44e4f92ecdf Mon Sep 17 00:00:00 2001 From: Danielle Huisman Date: Tue, 30 Apr 2024 08:04:03 +0200 Subject: [PATCH 2/2] Reduce layout shift update check while reference is clipped from --- packages/dom/src/auto_update.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/dom/src/auto_update.rs b/packages/dom/src/auto_update.rs index 9831bc1..28e8ce6 100644 --- a/packages/dom/src/auto_update.rs +++ b/packages/dom/src/auto_update.rs @@ -107,11 +107,12 @@ fn observe_move(element: Element, on_move: Rc) -> Box { } if ratio == 0.0 { + // If the reference is clipped, the ratio is 0. Throttle the refresh to prevent an infinite loop of updates. observe_timeout_id.replace(Some( observe_window .set_timeout_with_callback_and_timeout_and_arguments_0( (*timeout_closure).as_ref().unchecked_ref(), - 100, + 1000, ) .expect("Set timeout should be successful."), ));