Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Furnadjiev2016-10-14 08:53:13 +0000
committerIvan Furnadjiev2016-10-14 08:53:13 +0000
commit4df895329d2115095cde4e994f52fd094526b717 (patch)
treed11bf414b37ba751fad3d9496466cc1100fc7649 /bundles
parent415dc4f3a393b149c33c88ecae3b0a3faeb48e6f (diff)
downloadorg.eclipse.rap-4df895329d2115095cde4e994f52fd094526b717.tar.gz
org.eclipse.rap-4df895329d2115095cde4e994f52fd094526b717.tar.xz
org.eclipse.rap-4df895329d2115095cde4e994f52fd094526b717.zip
Fix a crash when try to scroll an empty Tree/Table on mobile browser
On empty Grid _getTopItem function returns null. _getScrollYOffset function now returns zero in this case. 505710: [Table][Tree] Client side error on touch event when no items exist https://bugs.eclipse.org/bugs/show_bug.cgi?id=505710 Change-Id: Ia64b65017a1b32c828f5c6f249d9e0a96cc452ef
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js3
1 files changed, 2 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 c0fa501ad3..b3cb19c407 100644
--- a/bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js
+++ b/bundles/org.eclipse.rap.rwt/js/rwt/runtime/MobileWebkitSupport.js
@@ -397,7 +397,8 @@ rwt.runtime.MobileWebkitSupport = {
_getScrollYOffset : function( scrollBar ) {
if( this._isGridRowContainer( this._touchSession.widgetTarget ) ) {
var grid = this._touchSession.widgetTarget.getParent();
- return grid._getTopItem().getOffset();
+ var topItem = grid._getTopItem();
+ return topItem ? topItem.getOffset() : 0;
}
return scrollBar.getValue();
},

Back to the top