diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2013-08-06 13:59:33 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2013-08-06 14:00:45 +0300 |
commit | 16d17f9824dfac7e55e3ca98444f9da3205c0336 (patch) | |
tree | 55f98ec2c284c02eefaa82da51ee45152d4f9641 | |
parent | 2ff71f623495995e83c71227630140f6609a13c4 (diff) | |
download | vaadin-framework-16d17f9824dfac7e55e3ca98444f9da3205c0336.tar.gz vaadin-framework-16d17f9824dfac7e55e3ca98444f9da3205c0336.zip |
Fix native scrolling regression in iOS 6 homescreen apps (#12295)
Change-Id: Ie225663ebc2a9ffe4b481a49e34e9dcf79b064b2
-rw-r--r-- | WebContent/VAADIN/themes/base/common/common.scss | 4 | ||||
-rw-r--r-- | client/src/com/vaadin/client/BrowserInfo.java | 18 |
2 files changed, 14 insertions, 8 deletions
diff --git a/WebContent/VAADIN/themes/base/common/common.scss b/WebContent/VAADIN/themes/base/common/common.scss index c32116cda8..cb3645c9d8 100644 --- a/WebContent/VAADIN/themes/base/common/common.scss +++ b/WebContent/VAADIN/themes/base/common/common.scss @@ -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; } diff --git a/client/src/com/vaadin/client/BrowserInfo.java b/client/src/com/vaadin/client/BrowserInfo.java index c733f38481..5d588f6f8b 100644 --- a/client/src/com/vaadin/client/BrowserInfo.java +++ b/client/src/com/vaadin/client/BrowserInfo.java @@ -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; |