Chrome 移动设备输入类型=文本缩放远离元素(并非试图阻止整体缩放)
我有一些 JavaScript 代码,可以将预订小部件注入客户的网站。直到最近,一切都工作正常,但我猜测一些针对移动设备的 Chrome 更新导致了一个问题,其中
注入的代码只是引用 JavaScript 文件的一行 HTML,如下所示:
问题是,当我点击“发件人地址”时“ Chrome 浏览器打开Android 会放大 10 倍并向右跳转。这不会影响三星浏览器、Firefox、Brave 或任何其他浏览器,我什至为某些人提供了一些示例,但这些浏览器并没有被破坏。
这是在给出字段焦点之前:
这是我们给予焦点的一次:
我遇到的问题是我无法在手机上打开开发人员工具来修复它,并且问题不会在 Browserstack 上重现,也不会在桌面版 Chrome 的响应模式下重现。 是否有办法在无需启动并运行整个 Android 模拟器的情况下进行调试?
放大效果损坏的客户示例:
注入代码工作示例:
我不确定是否有更好的地方可以问这个问题。我知道这对我自己来说非常具体,但不知道该去哪里寻找。
I have some JavaScript code which injects a booking widget into customer's websites. Until recently everything has worked fine, but I'm guessing some Chrome update for mobile has caused an issue where the
The injected code is just one line of HTML which references a JavaScript file, like this:
<script src='https://crown.addons.la/leads/new/forms/resize/expander.php' config='3'></script>
The problem is that when I click into the "From Address" the Chrome browser on Android zooms in like 10x and jumps to the right. This does NOT impact the Samsung Browser, Firefox, Brave or any other browser, and I even have examples for SOME people who it is not broken for.
Here is before giving the field focus:
Here is once we give it focus:
The problem I have is that I cannot open developer tools on my phone to fix it, and the problem does not reproduce on Browserstack nor in responsive mode in the desktop version of Chrome. Is there any way to go about debugging this without having to get an entire Android emulator up-and-running?
Examples of customers who have the broken zoom-in effect:
Example of the injected code working:
I'm not sure if there's a better place to ask this. I know it's very specific to myself, but not sure where to even look.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是 Chromium 本身的错误,已在 v103 中修复。
错误报告可在此处找到:https://bugs.chromium.org /p/chromium/issues/detail?id=1296183
This was a bug with Chromium itself, which was fixed in v103.
Bug report can be found here: https://bugs.chromium.org/p/chromium/issues/detail?id=1296183
我认为这可能是 corone 版本特定的问题,因为我在我的设备上检查了 chrome 和 firefox,没有这样的问题,但位置访问弹出窗口可能是罪魁祸首。
I think that might be a corone version specific issue as I cheched on my device both chrome and firefox there was no such issue but there is a chance that the location access popup mightbe the culprit.
如果表单字段中的文本低于一定大小,某些网络浏览器会自动放大表单字段。这个尺寸偶尔会改变。如果我没记错的话,尺寸已从 16px 更改为 18px。所以基本上你需要增加文本大小。
这是一个类似的问题:
禁用输入“文本”标签中的自动缩放 - Safari 打开iPhone
Some web browsers automatically zoom into form fields, if the text inside is below a certain size. this size occasionally changes. If I am not mistaken the size was changed from 16px to 18px. So basically you need to increase the text size.
This is a similar question to:
Disable Auto Zoom in Input "Text" tag - Safari on iPhone