summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-09-04 11:14:09 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-09-04 11:14:09 +0000
commit8b1e5a2d314ae89d96f38f2d09517bb2a45705dd (patch)
tree8006d38be8103acc807e59215ce5f27994d0017b
parent079a5cbd4b98c457756d26f693c20bd2b8f7ccec (diff)
downloadvaadin-framework-8b1e5a2d314ae89d96f38f2d09517bb2a45705dd.tar.gz
vaadin-framework-8b1e5a2d314ae89d96f38f2d09517bb2a45705dd.zip
Enable (hopefully this time for real) native touch scrolling on Mobile Safari 6+ (#8792)
svn changeset:24300/svn branch:6.8
-rw-r--r--WebContent/VAADIN/themes/base/common/common.css6
-rw-r--r--src/com/vaadin/terminal/gwt/client/BrowserInfo.java10
2 files changed, 11 insertions, 5 deletions
diff --git a/WebContent/VAADIN/themes/base/common/common.css b/WebContent/VAADIN/themes/base/common/common.css
index 74ed21bd1a..4dbe35704c 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;
-} \ No newline at end of file
+}
+/* Enable kinetic scrolling on Mobile Safari 6 */
+.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 6a94611a60..838af93ed5 100644
--- a/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
+++ b/src/com/vaadin/terminal/gwt/client/BrowserInfo.java
@@ -447,13 +447,15 @@ public class BrowserInfo {
if (!isTouchDevice()) {
return false;
}
+ // TODO Should test other Android browsers, especially Chrome
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 6 Safari supports native scrolling; iOS 5 suffers from #8792
+ // TODO Should test other iOS browsers
+ if (isIOS() && isSafari() && getBrowserMajorVersion() >= 6) {
+ return false;
+ }
return true;
}