diff options
author | Henri Sara <henri.sara@gmail.com> | 2017-08-07 10:08:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-07 10:08:57 +0300 |
commit | 583fa0c0edc173495bb8566cefcb142eab7b7cdd (patch) | |
tree | 14a1aa7567eaf4cc5a94a75350a87455b4a96ca1 /client | |
parent | 3b0722a0ba462e677fe2fb305709faac953ce5bf (diff) | |
download | vaadin-framework-583fa0c0edc173495bb8566cefcb142eab7b7cdd.tar.gz vaadin-framework-583fa0c0edc173495bb8566cefcb142eab7b7cdd.zip |
Fix caption width rounding in Chrome (#9785)
Otherwise, TabSheet close button may break the small theme
in ReindeerThemeTest when the caption width is rounded down.
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/VCaption.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/main/java/com/vaadin/client/VCaption.java b/client/src/main/java/com/vaadin/client/VCaption.java index 7e8fd97d25..0ed0bc037c 100644 --- a/client/src/main/java/com/vaadin/client/VCaption.java +++ b/client/src/main/java/com/vaadin/client/VCaption.java @@ -541,10 +541,10 @@ public class VCaption extends HTML { } if (captionText != null) { int textWidth = captionText.getScrollWidth(); - if (BrowserInfo.get().isFirefox()) { + if (BrowserInfo.get().isFirefox() || BrowserInfo.get().isChrome()) { /* - * In Firefox3 the caption might require more space than the - * scrollWidth returns as scrollWidth is rounded down. + * The caption might require more space than the scrollWidth + * returns as scrollWidth is rounded down. */ int requiredWidth = WidgetUtil.getRequiredWidth(captionText); if (requiredWidth > textWidth) { |