mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-22 23:42:16 +02:00
Merge branch 'master' into feature/select-add-items
This commit is contained in:
commit
f2ff214b08
|
@ -634,7 +634,7 @@ class Choices {
|
||||||
this.dropdown.setAttribute('aria-expanded', 'true');
|
this.dropdown.setAttribute('aria-expanded', 'true');
|
||||||
|
|
||||||
const dimensions = this.dropdown.getBoundingClientRect();
|
const dimensions = this.dropdown.getBoundingClientRect();
|
||||||
const dropdownPos = Math.ceil(dimensions.top + window.scrollY + dimensions.height);
|
const dropdownPos = Math.ceil(dimensions.top + window.scrollY + this.dropdown.offsetHeight);
|
||||||
|
|
||||||
// If flip is enabled and the dropdown bottom position is greater than the window height flip the dropdown.
|
// If flip is enabled and the dropdown bottom position is greater than the window height flip the dropdown.
|
||||||
let shouldFlip = false;
|
let shouldFlip = false;
|
||||||
|
@ -646,8 +646,6 @@ class Choices {
|
||||||
|
|
||||||
if (shouldFlip) {
|
if (shouldFlip) {
|
||||||
this.containerOuter.classList.add(this.config.classNames.flippedState);
|
this.containerOuter.classList.add(this.config.classNames.flippedState);
|
||||||
} else {
|
|
||||||
this.containerOuter.classList.remove(this.config.classNames.flippedState);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optionally focus the input if we have a search input
|
// Optionally focus the input if we have a search input
|
||||||
|
|
Loading…
Reference in a new issue