Android 版 Firefox 中的错误:小页面无法 100% 缩小

发布于 2025-01-16 05:54:35 字数 692 浏览 3 评论 0原文

我有一个非常简单的 W3C 有效 HTML,Firefox for Android 拒绝在 100% 视图中呈现:

<!DOCTYPE html>
<html lang="pt">
<head>
<title>Devastacao por lei</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
 <h3>Nothing here</h3>
</body>
</html>

无论我张开多少,Firefox 仍然呈现水平滚动条并允许我左右移动文本(即滚动页面)水平)。我可以放大,但无法缩小到在不移动文本/页面的情况下无法向左/向右滚动的程度。

我尝试摆弄辅助功能设置,但没有成功。尝试使用 about:config,但它什么也没显示。

Chrome 完美呈现页面。

这是一个错误吗?也许这个问题只发生在我的设备上......?

编辑此处报告的错误

I have this very simple W3C valid HTML that Firefox for Android refuses to render in 100% view:

<!DOCTYPE html>
<html lang="pt">
<head>
<title>Devastacao por lei</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
 <h3>Nothing here</h3>
</body>
</html>

No matter how much I pinch out, Firefox still renders the horizontal scrollbar and allows me to move the text right and left (i.e., scroll the page horizontally). I can zoom in, but I cannot zoom out to the point that I cannot scroll left/right without moving the text/page.

I tried fiddling with the Accessibility settings without luck. Tried with about:config, but it shows nothing.

Chrome renders the page perfectly.

Is this a bug? Maybe this problem happens with my device only...?

EDIT: Bug reported here

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

以往的大感动 2025-01-23 05:54:35

这绝对是 Firefox 中的一个错误,只有当页面高度小于设备高度时才会发生,即当整个页面适合高度时,AND当“滚动以隐藏工具栏”时在“设置”-“自定义”中打开。

要检查这一点,只需在 test
形式的

Nothing here

后面逐一添加行即可。你会看到同样的问题。不断添加线条,直到突然,页面的高度不再适合。然后,如果将其拉开,页面最终会适合宽度,并且一切正常。

解决方法:

只需将此行添加到您的 HTML 中即可:

<div style="height: 101vh;visibility: hidden;"></div>

或者更好的是,调整页面的高度。

请注意,这将使滚动条出现,并且即使底部“没有”,页面也会滚动。为 body 或 html 设置 overflow:hidden; 会阻止该解决方法发挥作用。

也许有人可以找到更好的解决方法......?

This is definitely a bug in Firefox, and only happens when the height of the page is smaller than the device height, that is, when the full page fits in height, AND when "Scroll to hide toolbar" is ON in Settings - Customize.

To check this, just add lines after the <h3>Nothing here</h3> of the form test<br> one by one. You will see the same problem. Keep adding lines until, suddenly, the page does not fit anymore in height. Then the page finally fits in width if pinched out, and everything works just fine.

WORKAROUND:

Just add this line to your HTML:

<div style="height: 101vh;visibility: hidden;"></div>

or, better, adjust the height to your page.

Notice that this will make the scrollbar to appear, and that the page will scroll even if there is "nothing" in the bottom. Setting overflow:hidden; for body or html prevents the workaround from working.

Maybe someone can find a better workaround...?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文