]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix native scrolling regression in iOS 6 homescreen apps (#12295)
authorJohannes Dahlström <johannesd@vaadin.com>
Tue, 6 Aug 2013 10:59:33 +0000 (13:59 +0300)
committerJohannes Dahlström <johannesd@vaadin.com>
Tue, 6 Aug 2013 11:00:45 +0000 (14:00 +0300)
Change-Id: Ie225663ebc2a9ffe4b481a49e34e9dcf79b064b2

WebContent/VAADIN/themes/base/common/common.scss
client/src/com/vaadin/client/BrowserInfo.java

index c32116cda8441cbc70573951ba0b838f115fd2d1..cb3645c9d83ff9e121a7af3312e0ee302198059c 100644 (file)
@@ -228,8 +228,8 @@ input::-ms-clear {
        line-height: normal;
 }
 
-/* Enable kinetic scrolling on Mobile Safari 6 */ 
-.v-ios.v-sa6 & .v-scrollable { 
+/* Enable kinetic scrolling on iOS 6 */
+.v-ios6.v-webkit & .v-scrollable {
        -webkit-overflow-scrolling: touch; 
 }
 
index c733f384813ca2494ccdfa04ed83c49e23849ddb..5d588f6f8b36e2a60a67638967fb56977d7a0bce 100644 (file)
@@ -190,7 +190,7 @@ public class BrowserInfo {
             }
             String osClass = getOperatingSystemClass();
             if (osClass != null) {
-                cssClass = cssClass + " " + prefix + osClass;
+                cssClass = cssClass + " " + osClass;
             }
             if (isTouchDevice()) {
                 cssClass = cssClass + " " + prefix + UI_TOUCH;
@@ -201,16 +201,22 @@ public class BrowserInfo {
     }
 
     private String getOperatingSystemClass() {
+        String prefix = "v-";
+
         if (browserDetails.isAndroid()) {
-            return OS_ANDROID;
+            return prefix + OS_ANDROID;
         } else if (browserDetails.isIOS()) {
-            return OS_IOS;
+            String iosClass = prefix + OS_IOS;
+            if (isIOS6()) {
+                iosClass += " " + prefix + OS_IOS + "6";
+            }
+            return iosClass;
         } else if (browserDetails.isWindows()) {
-            return OS_WINDOWS;
+            return prefix + OS_WINDOWS;
         } else if (browserDetails.isLinux()) {
-            return OS_LINUX;
+            return prefix + OS_LINUX;
         } else if (browserDetails.isMacOSX()) {
-            return OS_MACOSX;
+            return prefix + OS_MACOSX;
         }
         // Unknown OS
         return null;