1

我正在使用 GWT 2.4。在 ipad(ios 7) 中查看 Web 应用程序时,滚动有延迟。滚动事件仅在触摸结束事件完成后触发,因此有时看起来没有响应。当滚动已经发生时,当我尝试滚动时,滚动也会冻结。有没有人有同样的问题?请帮我。

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);
    }       
}
4

2 回答 2

0

这是我的代码,它直接来自展示。正如我所说,我使用 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());
}
于 2013-09-25T10:19:15.640 回答
0

稍微调试一下 javascript 后,我​​发现我的项目中包含的某些 jar 导致了延迟。罐子是大气-gwt-client-1.0.18.jar。

还发现我在 CSS 中使用 ACTIVE 和输入类型文本框,这导致了问题。当文本框处于活动状态时,我使用它来删除 webkit 浏览器中显示的轮廓。

于 2013-10-07T04:52:36.860 回答