]> source.dussan.org Git - vaadin-framework.git/commitdiff
#6227 Extra scrollbars in Window and other places in Opera 11
authorArtur Signell <artur.signell@itmill.com>
Tue, 4 Jan 2011 09:39:55 +0000 (09:39 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 4 Jan 2011 09:39:55 +0000 (09:39 +0000)
svn changeset:16780/svn branch:6.5

src/com/vaadin/terminal/gwt/client/BrowserInfo.java
src/com/vaadin/terminal/gwt/client/Util.java

index 8855e41594bfb57f2cbe62d118da0097c559c46f..651b936c54d5b6500038950da18f7540b9a7d70a 100644 (file)
@@ -253,6 +253,16 @@ public class BrowserInfo {
         return browserDetails.isOpera();
     }
 
+    public boolean isOpera10() {
+        return browserDetails.isOpera()
+                && browserDetails.getBrowserMajorVersion() == 10;
+    }
+
+    public boolean isOpera11() {
+        return browserDetails.isOpera()
+                && browserDetails.getBrowserMajorVersion() == 11;
+    }
+
     public native static String getBrowserString()
     /*-{
         return $wnd.navigator.userAgent;
index 1f02f4cfa72110d40ea81c7cabe738851a642f01..486ce7c8962a8d692c9ac5c7d63ac952d60cd869 100644 (file)
@@ -583,7 +583,9 @@ public class Util {
      */
     public static void runWebkitOverflowAutoFix(final Element elem) {
         // Add max version if fix lands sometime to Webkit
-        if (BrowserInfo.get().getWebkitVersion() > 0) {
+        // Starting from Opera 11.00, also a problem in Opera
+        if (BrowserInfo.get().getWebkitVersion() > 0
+                || (BrowserInfo.get().isOpera11())) {
             final String originalOverflow = elem.getStyle().getProperty(
                     "overflow");
             if ("hidden".equals(originalOverflow)) {