Android WebView 不会在表单输入时滚动到视口

发布于 2024-12-12 00:41:19 字数 298 浏览 0 评论 0原文

我们有一个带有一些输入表单的移动网站。当我在 Samsung Galaxy S II 上使用默认移动浏览器进行测试时,一切正常。

我们构建了一个“应用程序”,其中只有一个 WebView 调用此页面。所以行为应该是相同的。

但是当我使用该应用程序并输入一些表单输入并点击“下一步”时,网络视图不会自动滚动到视口中,因此我必须猜测哪个输入表单是焦点。我只是看不到“下一个”输入表单。

因此,使用默认浏览器时,输入表单会自动滚动到视口中。使用应用程序时却没有。有人知道为什么吗?这是 WebView 中的错误吗?

We having a mobile website with some input forms. When I test it with the default mobile browser on an Samsung Galaxy S II everything works fine.

We have build an "app" with just a WebView calling this page. So the behaviour should be the same.

But when I use the app and i enter some form input and hit "Next", the webview does not scroll automatically into the viewport, so I have to guess which input form is focused. I just can't see the "next" input form.

So with the default browser, the input form scrolls into viewport automatically. When using the app it doesn't. Does anybody know why? Is this a bug in WebView?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文