diff options
author | Adam Wagner <wbadam@users.noreply.github.com> | 2017-10-30 13:31:27 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2017-10-30 13:31:27 +0200 |
commit | ffe1e0c022c2098a0b719bffe0c9a707003bde05 (patch) | |
tree | 76571c5d276f52c6a40b346a4416ad346e00c58e /client/src | |
parent | e65efdfb50bc10bedf506d475f582276f6be0e2f (diff) | |
download | vaadin-framework-ffe1e0c022c2098a0b719bffe0c9a707003bde05.tar.gz vaadin-framework-ffe1e0c022c2098a0b719bffe0c9a707003bde05.zip |
Fix combo box suggestion popup height (#10256)
Fixes #10214
Diffstat (limited to 'client/src')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VComboBox.java | 14 |
1 files changed, 11 insertions, 3 deletions
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 |