Closed Bug 1425291 Opened 8 years ago Closed 6 years ago

Implement support for the autocapitalize atttribute

Categories

(Core :: DOM: Editor, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: rlanday, Assigned: m_kato)

References

Details

(Keywords: dev-doc-complete, parity-chrome, parity-safari, Whiteboard: [webcompat])

Attachments

(5 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36 Steps to reproduce: I am an engineer on Google Chrome currently working to get the autocapitalize attribute standardized: https://github.com/whatwg/html/pull/3273 The attribute is currently implemented in iOS Safari and Chrome for Android with incompatible implementations. Once the pull request is added, Firefox should add support the attribute (at least basic support for the IDL interface, and ideally support for input methods that perform autocapitalization). The attribute is most useful on mobile browsers; Firefox for iOS is built on WebKit, so no work needs to be done there. Firefox for Android probably wants to add support for using autocapitalize with Android keyboards. If you support touch screen keyboards and/or voice input in desktop Firefox, you might also want to add support for those.
Component: Untriaged → Editor
Product: Firefox → Core
Priority: -- → P3
See Also: → 1205133

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Webcompat Priority: ? → ---

Is this bug valid and ready to work on? I'd like to implement the autocapitalize attribute.

In case anyone would find this useful, I made a simple demo fiddle (tested on Chrome for Android):
https://jsitor.com/t3mzs47BZ

Related to @naktinis 's jsfiddle, I just added 2 cases for <textarea>, for which I noticed autocapitalize doesn't seem to work at all. Tried with with

  • autocapitalize="off"
  • autocapitalize="none"

Tested on Firefox for Android 68.3.0
Galaxy A50, Android 9

Assignee: nobody → m_kato

Virtual keyboard on Android (and API level of GTK) supports autocapitalization
that is automatically capitalize words and etc.

atucapitalize attribute inherits from form element if the element is button,
fieldset, input, output, select and textarea. Its tests are included in wpt.

WebKit on iOS and Blink on Android already support this HTML attribute, so I
would like to support this on Firefox/GeckoView Nightly.

Autocapitalize isn't applied if type is url, email or password. If these types,
truncate autocapitalize value in InputContext not to pass it to widget.

GTK has the properties for capitalization in GtkInputHints.
So we should add this hint.

android.view.inputmethod.EditorInfo has inputType feild that can control
capitalize of software keyboard. GeckoView should use it for autocapitalize
attribute support.

I have a question in https://phabricator.services.mozilla.com/D86674.

Shouldn't this use the content attribute.

I am sorry. What does "Shouldn't this use the content attribute." mean?

When using <form autocaitalize="words"><input autocapitalize="none"></form>, input.autocapitalize becomes none. So if input element has no autocapitalize attribute, input.autocapitalize returns words from form element. If input's autocapitalzie attribute is invalid value, it returns sentences.

Flags: needinfo?(bugs)

I think usually such webidl getters just reflect the attribute. Though per spec in this case asks us not to... https://html.spec.whatwg.org/#dom-autocapitalize

That is weird, and not how other attributes work, like disabled and others: https://html.spec.whatwg.org/#dom-fe-disabled

Commented in phabricator.

Flags: needinfo?(bugs)
Keywords: dev-doc-needed
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/e6d709b87e51 Part 1. Implement autocapitalize attribute. r=webidl,smaug https://hg.mozilla.org/integration/autoland/rev/052ae644fdee Part 2. Add autocapitalize attribute to htmlparser. r=hsivonen https://hg.mozilla.org/integration/autoland/rev/cb7e0a05e571 Part 3. Add autocapitalize to InputContext. r=masayuki https://hg.mozilla.org/integration/autoland/rev/c68e9df1984c Part 4. Support autocalitalize attribute on GTK. r=masayuki https://hg.mozilla.org/integration/autoland/rev/7a8abb665df2 Part 5. Support autocalitalize attribute on GeckoView. r=geckoview-reviewers,snorp

Added to release notes, BCD updated and an example submitted to the examples GitHub.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: