diff --git a/src/scripts/choices.ts b/src/scripts/choices.ts index 813f01e0..da7f2d61 100644 --- a/src/scripts/choices.ts +++ b/src/scripts/choices.ts @@ -521,6 +521,15 @@ class Choices { } this.passedElement.triggerEvent(EventType.showDropdown); + + const activeElement = this.choiceList.element.querySelector( + getClassNamesSelector(this.config.classNames.selectedState), + ); + + if (activeElement !== null && !isScrolledIntoView(activeElement, this.choiceList.element)) { + // We use the native scrollIntoView function instead of choiceList.scrollToChildElement to avoid smooth scroll. + activeElement.scrollIntoView(); + } }); return this;