简体   繁体   English

autocapitalize=“none” 不适用于<input type="“search”">在 Firefox 上 Android

[英]autocapitalize=“none” doesn't work for <input type=“search”> in Firefox on Android

This simple code doesn't work in Firefox on Android as expected:正如预期的那样,这个简单的代码在 Android 上的 Firefox 中不起作用:

 <input type="search" autocapitalize="none">

Expected behavior: input value is not automatically capitalized预期行为:输入值不会自动大写

Actual behavior: input value is capitalized实际行为:输入值大写

Am I missing something or it's a bug in Firefox on Android?我是否遗漏了什么,或者它是 Android 上的 Firefox 中的错误?


PS. PS。 I just noticed that SO code snippets don't work on mobile, here's the live demo for testing purposes: https://gleaming-kitty.glitch.me/我刚刚注意到 SO 代码片段在移动设备上不起作用,这是用于测试目的的现场演示: https://gleaming-kitty.glitch.me/

This does in fact seem to be a missing feature on Firefox for Android.事实上,这似乎是 Android 的 Firefox 上缺少的功能。 Here's the bug report.这是错误报告。 Feel free to vote and add yourself to CC (or maybe even contribute a patch).随意投票并将自己添加到 CC(甚至可能贡献一个补丁)。

https://bugzilla.mozilla.org/show_bug.cgi?id=1425291 https://bugzilla.mozilla.org/show_bug.cgi?id=1425291

I also made a simple demo for testing the autocapitalize attribute:我还做了一个简单的演示来测试 autocapitalize 属性:

https://jsitor.com/t3mzs47BZ https://jsitor.com/t3mzs47BZ

I would try autocapitalize="none" and autocapitalize="off" simultaneously.我会同时尝试autocapitalize="none"autocapitalize="off"

If that still doesn't work then there is probably a bug in the version of Firefox for Android you're using.如果这仍然不起作用,那么您正在使用的 Android 的 Firefox 版本中可能存在错误。

I've been struggling with this issue before and for I found out that For Android you need to use autocomplete="off"我之前一直在努力解决这个问题,因为我发现对于 Android 你需要使用autocomplete="off"

<input type="search" autocomplete="off" autocapitalize="none">

Give it a shot and let us know if it worked.试一试,让我们知道它是否有效。

The autocapitalize attribute was introduced for Safari in iOS and Starting in Chrome 43 for Android is also supported.在 iOS 中为Safari引入了 autocapitalize 属性,并且还支持从Chrome 43 开始的 Android

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM