File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments