Project: titanium
Issue TIMOB-19164: iOS: textfield getValue() returns the misspelled text under iOS8
h2. Problem description The textfield function "getValue()" returns the wrong (old) value, if the autocorrection replace the misspelled word. h2. Steps to reproduce 1. Click into the textfield 2. Enter a misspelled word like "asdjflkjsd" 3. Click into the textfield as soon as the autocorrection appears 4. Click the button to alert the wrong misspelled textfield value again h2. Test case {code:lang=javascript|title=app.js} (function() {	var win = Ti.UI.createWindow({backgroundColor:'#ffffff'});	var view = Ti.UI.createView({layout:'vertical'});	var button = Ti.UI.createButton({title:' Read textfield value ',top:20,borderRadius:5,borderColor:'#1C1C1C',backgroundColor:'#C0C0C0'});	var textfield = Ti.UI.createTextField({	borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED,	autocapitalization: Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE, top: 70, height: 30, width:Titanium.UI.FILL });	var label = Ti.UI.createLabel({left:20,top:20,width:Titanium.UI.FILL,font:{fontSize:12}, text:'PROBLEM DESCRIPTION\n' +'The textfield function "getValue()" returns the wrong (old)value, if the autocorrection replace the misspelled word\n\n' +'STEPT TO REPRODUCE\n' +'1. Click into the textfield\n' +'2. Enter a misspelled word like "asdjflkjsd"\n' +'3. Click into the textfield as soon as the autocorrection appears\n' +'4. Click the button to alert the wrong misspelled textfield value again.\n\n' +'ENVIRONMENT\n' +'Ti Mobile SDK: 3.4.0 GA, Ti Studio: 3.4.0.201409261227, iOS: 8.1 & 8.1.1, Device: iPhone 5 and 5S'});	button.addEventListener('click',function(e){	alert(textfield.getValue());	});	textfield.addEventListener('click',function(e){	if(textfield.getValue() !== ''){	alert(textfield.getValue());	}	});	view.add(textfield);	view.add(button);	view.add(label);	win.add(view);	win.open(); })(); {code}
Story points: 8