mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-09 00:56:34 +02:00
use dropdown offsetHeight instead of getBoundingClientRect.height
This commit is contained in:
parent
01dad3ac77
commit
dfafebc50a
|
@ -635,7 +635,7 @@ class Choices {
|
|||
this.dropdown.setAttribute('aria-expanded', 'true');
|
||||
|
||||
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.
|
||||
let shouldFlip = false;
|
||||
|
|
Loading…
Reference in a new issue