summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/com/vaadin/client/BrowserInfo.java16
-rw-r--r--client/src/com/vaadin/client/ui/VWindow.java3
2 files changed, 18 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/BrowserInfo.java b/client/src/com/vaadin/client/BrowserInfo.java
index 273964c889..78c5c1f59f 100644
--- a/client/src/com/vaadin/client/BrowserInfo.java
+++ b/client/src/com/vaadin/client/BrowserInfo.java
@@ -347,6 +347,22 @@ public class BrowserInfo {
}
/**
+ * Indicates whether the browser might require juggling to properly update
+ * sizes inside elements with overflow: auto when adjusting absolutely
+ * positioned elements.
+ * <p>
+ * See https://bugs.webkit.org/show_bug.cgi?id=123958 and
+ * http://code.google.com/p/chromium/issues/detail?id=316549
+ *
+ * @since 7.1.8
+ * @return <code>true</code> if the browser requires the workaround,
+ * otherwise <code>false</code>
+ */
+ public boolean requiresPositionAbsoluteOverflowAutoFix() {
+ return (getWebkitVersion() > 0) && Util.getNativeScrollbarSize() > 0;
+ }
+
+ /**
* Checks if the browser is run on iOS
*
* @return true if the browser is run on iOS, false otherwise
diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java
index f167ca5c23..be8efcd39b 100644
--- a/client/src/com/vaadin/client/ui/VWindow.java
+++ b/client/src/com/vaadin/client/ui/VWindow.java
@@ -343,7 +343,8 @@ public class VWindow extends VOverlay implements ShortcutActionHandlerOwner,
super.setVisible(visible);
}
- if (visible && BrowserInfo.get().isWebkit()) {
+ if (visible
+ && BrowserInfo.get().requiresPositionAbsoluteOverflowAutoFix()) {
/*
* Shake up the DOM a bit to make the window shed unnecessary