From ffe1e0c022c2098a0b719bffe0c9a707003bde05 Mon Sep 17 00:00:00 2001 From: Adam Wagner Date: Mon, 30 Oct 2017 13:31:27 +0200 Subject: Fix combo box suggestion popup height (#10256) Fixes #10214 --- client/src/main/java/com/vaadin/client/ui/VComboBox.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'client/src') diff --git a/client/src/main/java/com/vaadin/client/ui/VComboBox.java b/client/src/main/java/com/vaadin/client/ui/VComboBox.java index 14bddb43fe..c67c276417 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -867,10 +867,18 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, menuHeight -= up.getOffsetHeight() + down.getOffsetHeight() + status.getOffsetHeight(); } else { - final ComputedStyle s = new ComputedStyle( + final ComputedStyle menuStyle = new ComputedStyle( menu.getElement()); - menuHeight -= s.getIntProperty("marginBottom") - + s.getIntProperty("marginTop"); + final ComputedStyle popupStyle = new ComputedStyle( + suggestionPopup.getElement()); + menuHeight -= menuStyle.getIntProperty("marginBottom") + + menuStyle.getIntProperty("marginTop") + + menuStyle.getIntProperty("paddingBottom") + + menuStyle.getIntProperty("paddingTop") + + popupStyle.getIntProperty("marginBottom") + + popupStyle.getIntProperty("marginTop") + + popupStyle.getIntProperty("paddingBottom") + + popupStyle.getIntProperty("paddingTop"); } // If the available page height is really tiny then this will be -- cgit v1.2.3