diff options
author | Artur Signell <artur@vaadin.com> | 2013-11-08 11:26:08 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-11-08 11:51:09 +0200 |
commit | 1754b769e88c6fc9ed2895fad32b7b284b4a6de5 (patch) | |
tree | 7e8b9ed11eb5832545e57d264ae8c92083e9bab0 | |
parent | f5d245cefe2e832563097c11d7b11fcea0303349 (diff) | |
download | vaadin-framework-7.1.8.tar.gz vaadin-framework-7.1.8.zip |
Do not apply fix on mobile devices or devices without scrollbars (#12736)7.1.8
Change-Id: I38ef869d87418c18197a59a5ecd3fb7e12e1c02e
-rw-r--r-- | client/src/com/vaadin/client/BrowserInfo.java | 16 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VWindow.java | 3 |
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 |