Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElshad Seyidmammadov2016-04-27 09:44:17 -0400
committerIvan Furnadjiev2016-04-28 15:00:01 -0400
commit1030bb49cab0aca7e10c5b8ddbb50b4e78681990 (patch)
tree172e59a6d656dbb2859aa8be1cd234f487e3274c /bundles
parent8e19ee88f564cb6b1585a45fb5f5f16c7b6e0cff (diff)
downloadorg.eclipse.rap-1030bb49cab0aca7e10c5b8ddbb50b4e78681990.tar.gz
org.eclipse.rap-1030bb49cab0aca7e10c5b8ddbb50b4e78681990.tar.xz
org.eclipse.rap-1030bb49cab0aca7e10c5b8ddbb50b4e78681990.zip
Website-like scrolling don't work in mobile browsers
In Mobile browsers although overflow is enabled, the page cannot be scrolled by touch moving. Client document scrolling is not taken into account. To fix the issue, enable scrolling by checking client document overflow property. Change-Id: Iea1948eded1775f811e5c78cdc4624fc4c4c258e Signed-off-by: Elshad Seyidmammadov <elshad@eclipsesource.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js b/bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js
index 6d2c3d9118..24a0cd1cd0 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2014 Innoopract Informationssysteme GmbH and others.
+ * Copyright (c) 2010, 2016 Innoopract Informationssysteme GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -332,6 +332,8 @@ rwt.runtime.MobileWebkitSupport = {
result.scroll = true;
} else if( this._isFocusable( widgetTarget ) ) {
result.focus = true;
+ } else if( this._allowNativeScroll && this._isClientDocumentScrollingEnabled() ) {
+ result.scroll = true;
}
return result;
},
@@ -412,6 +414,12 @@ rwt.runtime.MobileWebkitSupport = {
return result;
},
+ _isClientDocumentScrollingEnabled : function() {
+ var doc = rwt.widgets.base.ClientDocument.getInstance();
+ var overflow = doc.getOverflow();
+ return overflow && overflow !== "hidden";
+ },
+
_findScrollable : function( widget ) {
var result = null;
var currentWidget = widget;

Back to the top