简体   繁体   中英

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:

 <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?


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/

This does in fact seem to be a missing feature on Firefox for Android. Here's the bug report. Feel free to vote and add yourself to CC (or maybe even contribute a patch).

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

I also made a simple demo for testing the autocapitalize attribute:

https://jsitor.com/t3mzs47BZ

I would try autocapitalize="none" and autocapitalize="off" simultaneously.

If that still doesn't work then there is probably a bug in the version of Firefox for Android you're using.

I've been struggling with this issue before and for I found out that For Android you need to use 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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