Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11003] iOS: UITextField autocompletion suggestion is not committed

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-19T10:58:14.000+0000
Affected Version/sRelease 2.1.3
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam, api, exalture
ReporterEduardo Gomez
Assigneesrikanth ravipati
Created2012-09-19T15:19:00.000+0000
Updated2017-03-21T21:25:31.000+0000

Description

Issue

With a TextArea, one can programmatically set it to editable=false to commit the current autocompletion suggestion. With a TextFiled, setting editable=false does not commit the autocompletion suggestion.

Reproduction steps

1. Run sample code 2. Type "test" into the TextArea (first field) - iOS will suggest "Test" (initial caps) 3. Click the "Get TextArea Value" button, and "Test" is alerted and the value of the TextArea is updated to reflect the committed autocompletion suggestion.

Actual behavior

If you reproduce the above steps in the TextField (second field), the autocompletion suggestion is not committed.

Expected behavior

To have the TextField work like the TextArea, so that the TextField works like the iOS native Messages app, committing the autocompletion suggestion on a button click.

Tested on

iOS 5.1 simulator

Actual Sample

Titanium.UI.setBackgroundColor('#000');

var win = Titanium.UI.createWindow({  
  	title: 'test',
  	layout: 'vertical'
});

var txtArea = Ti.UI.createTextArea({
	width: 300,
	height: 20,
	top: 10
});
win.add(txtArea);

var btnArea = Ti.UI.createButton({
	title: 'Get TextArea Value',
	top: 10
});
win.add(btnArea);
btnArea.addEventListener('click', function(){
	txtArea.editable=false;
	alert(txtArea.value);
	txtArea.editable=true;
});

var txtField = Ti.UI.createTextField({
	width: 300,
	height: 16,
	top: 30,
	backgroundColor: 'white'
});
win.add(txtField);

var btnField = Ti.UI.createButton({
	title: 'Get TextField Value',
	top: 10
});
win.add(btnField);
btnField.addEventListener('click', function(){
	txtField.editable=false;
	alert(txtField.value);
	txtField.editable=true;
});

win.open();

Attachments

FileDateSize
Autocomplete1.jpg2012-09-19T15:19:00.000+000073628

Comments

  1. srikanth ravipati 2013-03-19

    try with 3.2.1 could not reproduce.
  2. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced.

JSON Source