From d04aa5c7af9ec6f4c703fba41afbd1607efca4c3 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 7 Sep 2017 16:55:36 +0200 Subject: [PATCH] FIX: component height computation was wrong --- app/assets/javascripts/discourse/components/select-box.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/components/select-box.js.es6 b/app/assets/javascripts/discourse/components/select-box.js.es6 index 0fa6c33c107..eb4f9485ddd 100644 --- a/app/assets/javascripts/discourse/components/select-box.js.es6 +++ b/app/assets/javascripts/discourse/components/select-box.js.es6 @@ -91,7 +91,7 @@ export default Ember.Component.extend({ let options = { left: "auto", bottom: "auto", left: "auto", top: "auto" }; const headerHeight = this.$(".select-box-header").outerHeight(false); const filterHeight = this.$(".select-box-filter").outerHeight(false); - const collectionHeight = this.$(".select-box-collection").outerHeight(false); + const bodyHeight = this.$(".select-box-body").outerHeight(false); const windowWidth = $(window).width(); const windowHeight = $(window).height(); const boundingRect = this.$()[0].getBoundingClientRect(); @@ -116,7 +116,7 @@ export default Ember.Component.extend({ } } - const componentHeight = this.get("verticalOffset") + collectionHeight + filterHeight + headerHeight; + const componentHeight = this.get("verticalOffset") + bodyHeight + headerHeight; const hasBelowSpace = windowHeight - offsetTop - componentHeight > 0; if (hasBelowSpace) { this.$().addClass("is-below");