From 2ebef172db0ec607374c4b2a96f6c26cbfdccbf1 Mon Sep 17 00:00:00 2001 From: Xon <635541+Xon@users.noreply.github.com> Date: Tue, 17 Mar 2026 21:16:36 +0800 Subject: [PATCH] Fix opening the dropdown could cause the entire page to scroll --- src/scripts/choices.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/choices.ts b/src/scripts/choices.ts index f15efa2b..2d0637c9 100644 --- a/src/scripts/choices.ts +++ b/src/scripts/choices.ts @@ -527,8 +527,8 @@ class Choices { ); if (activeElement !== null && !isScrolledIntoView(activeElement, this.choiceList.element)) { - // We use the native scrollIntoView function instead of choiceList.scrollToChildElement to avoid animated scroll. - activeElement.scrollIntoView(); + // scrollIntoView can cause entire page scrolling, scrollToChildElement causes undesired animation + this.choiceList.element.scrollTop = activeElement.offsetTop; } });