From af1b6145dfc7b1bfb0447e694e5e514b92597fdd Mon Sep 17 00:00:00 2001 From: LeiZhang <50943004+cactuser-Lu@users.noreply.github.com> Date: Wed, 4 Feb 2026 17:35:24 +0800 Subject: [PATCH] Prevent scroll on focus for matched element Update focus behavior to prevent scrolling when focusing an element. --- src/Dom/focus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dom/focus.ts b/src/Dom/focus.ts index 1b8ea5b9..7d7759bd 100644 --- a/src/Dom/focus.ts +++ b/src/Dom/focus.ts @@ -123,7 +123,7 @@ function syncFocus() { ? lastFocusElement : focusableList[0]; - matchElement?.focus(); + matchElement?.focus({ preventScroll: true }); } else { lastFocusElement = activeElement as HTMLElement; }