From 7f9af06f788377d5afe1edc549a2dba5a1a1b92a Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Thu, 18 Jun 2020 13:29:28 +0200 Subject: [PATCH] Fix dropdown position for full screen modals --- app/assets/javascripts/sitewide/dropdown_selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/sitewide/dropdown_selector.js b/app/assets/javascripts/sitewide/dropdown_selector.js index 2400e33d3..da29489a9 100644 --- a/app/assets/javascripts/sitewide/dropdown_selector.js +++ b/app/assets/javascripts/sitewide/dropdown_selector.js @@ -65,7 +65,7 @@ var dropdownSelector = (function() { var maxHeight = 0; const bottomTreshold = 280; - if (modalContainer.length && windowHeight - modalContainer.height() > bottomTreshold) { + if (modalContainer.length && windowHeight !== modalContainer.height()) { let modalClientRect = modalContainer[0].getBoundingClientRect(); windowHeight = modalContainer.height() + modalClientRect.top; containerPositionLeft -= modalClientRect.left;