]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix caption width rounding in Chrome (#9785)
authorHenri Sara <henri.sara@gmail.com>
Mon, 7 Aug 2017 07:08:57 +0000 (10:08 +0300)
committerGitHub <noreply@github.com>
Mon, 7 Aug 2017 07:08:57 +0000 (10:08 +0300)
Otherwise, TabSheet close button may break the small theme
in ReindeerThemeTest when the caption width is rounded down.

client/src/main/java/com/vaadin/client/VCaption.java
tests/screenshots

index 7e8fd97d25cec8daad9fb50769af3b41f9a4d69a..0ed0bc037c264a70cdd3e280ef03b5e5a8688ba0 100644 (file)
@@ -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) {
index 7d70f6d3fa34ae6fdbfb874994f24ba08abfe13b..22411451972c80c172196361499d8403c9323c1d 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7d70f6d3fa34ae6fdbfb874994f24ba08abfe13b
+Subproject commit 22411451972c80c172196361499d8403c9323c1d