1

I am using GWT 2.4. There is a delay in scrolling, when viewing the web application in ipad(ios 7). The scroll event fires only after the touch end event is completed, thereby making it look unresponsive at times. The scroll also freezes when I try to scroll when scrolling is already happening. Does anyone have the same problem? Please help me.

protected void addContentPane()
{
        ScrollPanel touchScroller = new ScrollPanel();
        touchScroller.setStyleName("touchScrollContainer");
        touchScroller.setSize((width - 2) + "px", contentPaneHeight + "px");
        touchScroller.getElement().setId(tabID);
        touchScrollPane = new HTML("", true);
        touchScrollPane.setHTML("A big boring String....");
        touchScroller.setWidget(touchScrollPane);
        contentPane.add(touchScroller);
    }       
}
samuel
  • 53
  • 6

2 Answers2

0

Here's my code, it's straight from the showcase. As I said I tested with GWT 2.5.1, mgwt 1.1.2, iOS7

public ScreenViewA(String id, boolean isOptions) {
    main = new LayoutPanel();

    scrollPanel = new ScrollPanel();
    scrollPanel.setScrollingEnabledX(false);

    headerPanel = new HeaderPanel();
    title = new HTML();
    headerPanel.setCenterWidget(title);
    headerBackButton = new HeaderButton();
    headerBackButton.setBackButton(true);
    headerBackButton.setVisible(!MGWT.getOsDetection().isAndroid());

    headerMainButton = new HeaderButton();
    headerMainButton.setRoundButton(true);

    headerPanel.setLeftWidget(headerBackButton);

    main.add(headerPanel);


    scrollPanel.setUsePos(MGWT.getOsDetection().isAndroid());
}
Spiff
  • 3,873
  • 4
  • 25
  • 50
  • I also have touchStart, touchMove and touchEnd handlers for HTML touchScrollPane(text inside scrollPane), as I am manipulating the text in that div. Could it be that somehow the events related to scroll panel are not being fired? – samuel Sep 25 '13 at 10:55
0

After debugging the javascript a bit, I found out that certain jars that I have included in my project were causing the delay. The jar was atmosphere-gwt-client-1.0.18.jar.

Also found out that I was using ACTIVE with input type textbox in the CSS which was causing the problem. I was using it to remove the outline that is shown in webkit browsers when textbox is active.

samuel
  • 53
  • 6