Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4869] iOS - Ti.UI.TEXT_AUTOCAPITALIZATION_WORDS is not working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNot Our Bug
Resolution Date2017-03-23T14:56:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterCaio Perdona
AssigneeShak Hossain
Created2017-03-21T22:15:00.000+0000
Updated2017-03-23T18:08:57.000+0000

Description

Autocapitalization constant {noformat} Ti.UI.TEXT_AUTOCAPITALIZATION_WORDS {noformat} is not working on iOS devices. Text typed on texfield shows no capitalization at all. Android is working fine.

Attachments

FileDateSize
app.js2017-03-22T16:40:47.000+00001591
test_keyboard.zip2017-03-23T14:56:39.000+000025053

Comments

  1. Hans Knöchel 2017-03-22

    Can you provide a test-case (contents of a simple app.js test-case)? That would speed-up the review process, thx!
  2. Caio Perdona 2017-03-22

    How can I attach files here?
  3. Hans Knöchel 2017-03-22

    Just paste the code here, that's fine.
  4. Caio Perdona 2017-03-22

    Here is a test case. TextField with autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_WORDS not capitalizing anything.
  5. Hans Knöchel 2017-03-22

    Works for me:
       
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
       
       var fullName = Ti.UI.createTextField({
           width: 300,
           height: 48,
           autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_WORDS,
           hintText: 'Full Name',
           backgroundColor: "#f0f0f0"
       });
       
       win.add(fullName);
       win.open();
       
    Maybe one of the other properties intercepts the property? We don't do anything with the constant, just passing it to the native object.
  6. Caio Perdona 2017-03-22

    Will try to remove one property at a time. But, still, it should work with all the properties I've set.
  7. Caio Perdona 2017-03-22

    @Hans I discovered that this property {noformat}keyboardType: Ti.UI.KEYBOARD_TYPE_NAMEPHONE_PAD{noformat} makes autocapitalization stop working. Is there a workaround for this?
  8. Hans Knöchel 2017-03-23

    Hey Caio, sorry to say that but it looks like native behavior. iOS seems to disallow word-capitalization of words when using this specific keyboard type. Native test-project attached to this ticket. To workaround the native limitation, you could check the words and capitalize them manually. I may be able to help you there, but please try it before. Thanks!
  9. Caio Perdona 2017-03-23

    Hans, thanks for the fast feedback. I will see what I can do here to workaround this.

JSON Source