Browse Source

Enable native scrolling in all iOS versions newer than 5, not just iOS 6 (#12324)

Change-Id: I8f9ec7f34aefa5b48fd23f3f000f9455475edefa
tags/7.1.7
Johannes Dahlström 10 years ago
parent
commit
cdb9a49bd5

+ 5
- 3
WebContent/VAADIN/themes/base/common/common.scss View File

font-size: 0; font-size: 0;
line-height: normal; line-height: normal;
} }

/* Enable kinetic scrolling on iOS 6 */
.v-ios6.v-webkit & .v-scrollable {
.v-ios.v-webkit & .v-scrollable {
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
} }
/* Disable native scrolling on iOS 5 due to #8792 */
.v-ios5.v-webkit & .v-scrollable {
-webkit-overflow-scrolling: none;
}


&.v-overlay-container { &.v-overlay-container {
width: 0; width: 0;

+ 4
- 4
client/src/com/vaadin/client/BrowserInfo.java View File

return prefix + OS_ANDROID; return prefix + OS_ANDROID;
} else if (browserDetails.isIOS()) { } else if (browserDetails.isIOS()) {
String iosClass = prefix + OS_IOS; String iosClass = prefix + OS_IOS;
if (isIOS6()) {
iosClass += " " + prefix + OS_IOS + "6";
if (getOperatingSystemMajorVersion() == 5) {
iosClass += " " + prefix + OS_IOS + "5";
} }
return iosClass; return iosClass;
} else if (browserDetails.isWindows()) { } else if (browserDetails.isWindows()) {
if (isAndroid() && isWebkit() && getWebkitVersion() >= 534) { if (isAndroid() && isWebkit() && getWebkitVersion() >= 534) {
return false; return false;
} }
// iOS 6 Safari supports native scrolling; iOS 5 suffers from #8792
// iOS 6+ Safari supports native scrolling; iOS 5 suffers from #8792
// TODO Should test other iOS browsers // TODO Should test other iOS browsers
if (isIOS6() && isWebkit()) {
if (isIOS() && isWebkit() && getOperatingSystemMajorVersion() >= 6) {
return false; return false;
} }
return true; return true;

Loading…
Cancel
Save