Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14381] Android: autocorrect doesn't work

GitHub Issuen/a
TypeBug
Priorityn/a
StatusReopened
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsautocorrect
ReporterDjamel ZAHAL
AssigneeUnknown
Created2013-06-14T09:58:50.000+0000
Updated2019-04-24T17:11:18.000+0000

Description

*Problem* When autocorrect is set false, autocorrect is still activated in textField. *Test Case*
var win = Ti.UI.createWindow({
  backgroundColor : "#fff",
  layout: "vertical"
});
var AutocorrectFalse = Ti.UI.createTextField({
  borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
  color: '#336699',
  top: '10dp', left: '10dp',
  width: '250dp', height: '60dp',
  hintText: "AutocorrectFalse",
  autocorrect: false
})
var AutocorrectTrue = Ti.UI.createTextField({
  borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
  color: '#336699',
  top: '10dp', left: '10dp',
  width: '250dp', height: '60dp',
  hintText: "AutocorrectTrue",
  autocorrect: true
})
win.add(AutocorrectFalse);
win.add(AutocorrectTrue);
win.open();
*Expected Behavior* When autocorrect is set false, autocorrect should not still be activated *Actual Behavior* autocorrect: false leads to autocorrect still activated *Note* This is only happening on stock Samsung keyboard, when using Swype, the feature works as expected.

Comments

  1. Carter Lathrop 2013-06-14

    Hello Djamel, Would you mind providing a small test case that shows this behavior? A simple snippet of code (under 50 lines) that is easily copied and pasted into an app.js to show the issue you are describing. This ensures we are both on the same page about what code you are trying and what is not working. Thanks for your patience. For future reference on how to created complete bug reports: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report Regards, Carter
  2. Jerod Fritz 2013-06-24

    I am experiencing the same problem using Galaxy SIII running 4.1.1 Titanium SDK 3.1.1GA. With autocorrect on input is very slow causing input to take a couple seconds per keystroke *in any view xml*
       <TextField  />
       
    *in either app.tss or the specific controller.tss*
       'TextField': {
         backgroundColor: '#fff',
         color: '#000',
         autocorrect: false,
         clearOnEdit : false,
         accessibilityHidden : false
       }
       
  3. Carter Lathrop 2013-06-24

    Hello Jerod, Would you mind providing a classic Titanium test case? This way we can determine if the issue lies with alloy or Ti SDK. Thanks for the extra information on this. As soon as a reproducible test case is provided I will move to Ti-Mobile for engineering to look at. Regards, Carter
  4. Jerod Fritz 2013-06-24

    Here it is both ways for you to test this code should be identical *Galaxy SIII running 4.1.1 Titanium SDK 3.1.1GA* *app.js*
       var win = Ti.UI.createWindow({
         backgroundColor : "#fff",
         layout: "vertical"
       });
       var AutocorrectFalse = Ti.UI.createTextField({
         borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
         color: '#336699',
         top: '10dp', left: '10dp',
         width: '250dp', height: '60dp',
         hintText: "AutocorrectFalse",
         autocorrect: false
       })
       var AutocorrectTrue = Ti.UI.createTextField({
         borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
         color: '#336699',
         top: '10dp', left: '10dp',
         width: '250dp', height: '60dp',
         hintText: "AutocorrectTrue",
         autocorrect: true
       })
       win.add(AutocorrectFalse);
       win.add(AutocorrectTrue);
       win.open();
       
    *index.js*
       $.index.open();
       
    *index.xml*
       <Alloy>
       	<Window class="container" layout="vertical">
       		<TextField id="AutocorrectFalse" hintText="AutocorrectFalse" />
       		<TextField id="AutocorrectTrue" hintText="AutocorrectTrue" />
       	</Window>
       </Alloy>
       
    *index.tss*
       ".container": {
         backgroundColor:"white"
       }
       "TextField":{
         borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,
         color: '#336699',
         top: '10dp', left: '10dp',
         width: '250dp', height: '60dp'
       }
       "#AutocorrectFalse": {
       	autocorrect: false
       }
       "#AutocorrectTrue": {
         autocorrect: true
       }  
       
  5. Carter Lathrop 2013-06-25

    Tested and confirmed on Android GS3 4.1.1 using 3.1.1GA. It is interesting to note however that this is only happening on the stock samsung keyboard. When using the Swype keyboard, the autocorrect property functions as expected.
  6. Michael Gangolf 2019-04-24

    Since I have this issue in the current 8.0.0.GA I've search for a workaround and found one. You can set the inputype to "visible password" with: {inputType: [144]} and it won't show any suggestion.

JSON Source