ScrollPanel不同步我无法使用(例如android)虚拟键盘在(mgwt)ScrollPanels和(gwt)DisclosurePanels上找到解决方案。ScrollPanel当DisclosurePanel +虚拟键盘
在使用移动虚拟键盘将数据输入到DisclosurePanel中的文本字段(并且虚拟键盘消失)后,我的应用中的ScrollPanel与页面不同步。我无法滚动到页面顶部,页面末尾有空白区域表示虚拟键盘的大小。因此,可以在页面末尾滚动,但不能顶部。
页面通常有几个披露面板。输入输入时页面上的所有面板都打开时,不会出现不同步情况。如果在弹出时键盘被取消(即没有输入),也会保持正确的滚动。
UI粘结剂片段:
<mgwt:panel.scroll.ScrollPanel ui:field="ascroll">
<mgwt:panel.flex.FlexPanel>
<mgwt:header.HeaderPanel>
<mgwt:header.HeaderTitle ui:field="atitle"/>
</mgwt:header.HeaderPanel>
<gwt:DisclosurePanel width="100%">
<gwt:customHeader>
<mgwt:header.HeaderPanel
<mgwt:header.HeaderTitle ui:field="anothertitle"/>
</mgwt:header.HeaderPanel>
</gwt:customHeader>
<mgwt:panel.flex.FlexPanel>
<mgwt:form.Form>
<mgwt:form.FormEntry>
<mgwt:input.MTextBox ui:field="afield"/>
</mgwt:form.FormEntry>
</mgwt:form.Form>
</mgwt:panel.flex.FlexPanel>
</gwt:DisclosurePanel>
</mgwt:panel.flex.FlexPanel>
</mgwt:panel.scroll.ScrollPanel>
我在ScrollPanel使用refresh
为DisclosurePanels所有打开/关闭。工作正常。我也试图在/onFocus
事件的领域也做refresh
,但无济于事。
视口被设置为以下(也试过/使用默认getAppSetting()
):
ViewPort viewPort = new MGWTSettings.ViewPort();
viewPort
.setWidthToDeviceWidth()
.setHeightToDeviceHeight()
.setUserScaleAble(false)
.setMinimumScale(1.0)
.setMinimumScale(1.0)
.setMaximumScale(1.0);
MGWTSettings settings = new MGWTSettings();
settings.setViewPort(viewPort);
settings.setFullscreen(true);
settings.setFixIOS71BodyBug(true);
settings.setPreventScrolling(true);
MGWT.applySettings(settings);
到我能做些什么,以确保滚动是在同步与页面的大小有什么建议?