From: Johannes Dahlström Date: Tue, 7 Aug 2012 11:46:34 +0000 (+0000) Subject: Enable native touch scrolling on iOS 6 (#8792) X-Git-Tag: 7.0.0.beta1~79^2~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0cb6d53b234eafbf94a3d451d7ebddd8d2e14e53;p=vaadin-framework.git Enable native touch scrolling on iOS 6 (#8792) svn changeset:24094/svn branch:6.8 --- diff --git a/WebContent/VAADIN/themes/base/common/common.css b/WebContent/VAADIN/themes/base/common/common.css index 74ed21bd1a..6bc3fea9b0 100644 --- a/WebContent/VAADIN/themes/base/common/common.css +++ b/WebContent/VAADIN/themes/base/common/common.css @@ -233,4 +233,8 @@ div.v-app-loading { .v-scrollable { overflow: auto; +} +/* Enable kinetic scrolling on Mobile Safari */ +.v-ios.v-sa6 .v-scrollable { + -webkit-overflow-scrolling: touch; } \ No newline at end of file diff --git a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java index 4b9f3eacab..76c9552e6a 100644 --- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java +++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java @@ -450,13 +450,15 @@ public class BrowserInfo { if (!isTouchDevice()) { return false; } + // Android 4+ has native scrolling if (isAndroid() && isWebkit() && getWebkitVersion() >= 534) { return false; } - // Cannot enable native touch scrolling on iOS 5 until #8792 is resolved - // if (isIOS() && isWebkit() && getWebkitVersion() >= 534) { - // return false; - // } + // iOS 5 has native scrolling but suffers from #8792; + // iOS 6 works fine. + if (isIOS() && isWebkit() && getWebkitVersion() >= 536) { + return false; + } return true; }