From dfafebc50acafbed3cd816441c7e1ec0753402e7 Mon Sep 17 00:00:00 2001 From: Adam Mockor Date: Tue, 2 May 2017 15:16:53 +0200 Subject: [PATCH] use dropdown offsetHeight instead of getBoundingClientRect.height --- assets/scripts/src/choices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/scripts/src/choices.js b/assets/scripts/src/choices.js index c998404..2255128 100644 --- a/assets/scripts/src/choices.js +++ b/assets/scripts/src/choices.js @@ -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;