Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » mobile touch scroll of tables
mobile touch scroll of tables [message #1735067] Wed, 15 June 2016 08:46 Go to next message
bogdan toma is currently offline bogdan tomaFriend
Messages: 39
Registered: February 2010
Member
Hello,
we are testing eclipse rap 3.1 RC3 and we saw that the mobile touch scrolling is working for tables (as opposed to version 3.1M6).
But there is a small issue for us: - when table reaches the end of scroll it jumps to beginning of the table. Is this a bug or a desired feature ?
We identify that the problem might come from here:
rwt.runtime.MobileWebkitSupport._adaptScrollYOffset

We add the following code to patch around this issue:
rwt.runtime.MobileWebkitSupport._adaptScrollYOffset = function( scrollY ) {
  if( this._isGridRowContainer( this._touchSession.widgetTarget ) ) {
      var grid = this._touchSession.widgetTarget.getParent();
      var offsetY = (scrollY - this._touchSession.initScrollY);
      var item = grid.getRootItem().findItemByOffset( scrollY );
      return item ? item.getFlatIndex() : ((offsetY > 0) ? grid.getRootItem().getLastChild() : 0);
    }
    return scrollY ;
};


I am writing due to the fact we would like to have it if possible in the final version of 3.1
Thank you.
Re: mobile touch scroll of tables [message #1737730 is a reply to message #1735067] Tue, 12 July 2016 10:11 Go to previous message
zone whua is currently offline zone whuaFriend
Messages: 7
Registered: July 2009
Location: Wuhan China
Junior Member
native scrolling is better choise.

1. import a css file and add line:

body{
-webkit-overflow-scrolling: touch;
}

2. load head.html in application

in ApplicationConfiguration
...
properties.put(WebClient.HEAD_HTML, Utils.readTextFromResource("resources/head.html", "UTF-8", loader));
...

3. modify head.html
rap generate viewport meta, but it's not contain "content="width=device-width",
if not, when you scrolling up the table to the bottom, it will continue to scroll a white body. add lines below to avoid that:
...
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0"/>
...

Previous Topic:Tree items ordering problem
Next Topic:[ANN] RAP 3.1 Released
Goto Forum:
  


Current Time: Fri Apr 26 14:56:09 GMT 2024

Powered by FUDForum. Page generated in 0.03630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top