Skip to content

Commit 13288ed

Browse files
committed
Merge branch 'adammockor-fix/dropdown-height'
2 parents 01dad3a + cdc06ef commit 13288ed

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

assets/scripts/src/choices.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ class Choices {
635635
this.dropdown.setAttribute('aria-expanded', 'true');
636636

637637
const dimensions = this.dropdown.getBoundingClientRect();
638-
const dropdownPos = Math.ceil(dimensions.top + window.scrollY + dimensions.height);
638+
const dropdownPos = Math.ceil(dimensions.top + window.scrollY + this.dropdown.offsetHeight);
639639

640640
// If flip is enabled and the dropdown bottom position is greater than the window height flip the dropdown.
641641
let shouldFlip = false;
@@ -647,8 +647,6 @@ class Choices {
647647

648648
if (shouldFlip) {
649649
this.containerOuter.classList.add(this.config.classNames.flippedState);
650-
} else {
651-
this.containerOuter.classList.remove(this.config.classNames.flippedState);
652650
}
653651

654652
// Optionally focus the input if we have a search input

0 commit comments

Comments
 (0)