2013-09-24 27 views
1

我正在使用GWT 2.4。 在ipad(ios 7)中查看Web应用程序时,滚动会有延迟。 只有在触摸结束事件完成后,才会触发滚动事件,从而使其看起来无反应。当滚动已经发生时,滚动条也会冻结。有没有人有同样的问题?请帮帮我。只有在GWT中的触摸完成后滚动才会发生ScrollPanel

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); 
    }  
} 
+0

2.5.1会发生吗? – Spiff

+0

不,我没有用2.5来检查它。 – samuel

+0

请用2.5.1检查一下,我认为问题会消失。 – Spiff

回答

0

这是我的代码,它直接从showcase。 正如我说我使用GWT 2.5.1,1.1.2 mgwt,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()); 
} 
+0

我也有touchStart,touchMove和touchEnd处理程序的HTML touchScrollPane(scrollPane内的文本),因为我操纵该div中的文本。难道不知道与滚动面板相关的事件不会被解雇吗? – samuel

0

测试调试的JavaScript了一下,我发现,我已经包括在我的项目一定罐子造成的延迟之后。 jar是atmosphere-gwt-client-1.0.18.jar。

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

相关问题