Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10565] MobileWeb: TextField - clearing value when focused

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-17T08:18:38.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Sprint 2012-19 JS, 2012 Sprint 19
ComponentsMobileWeb
Labelsn/a
ReporterJon Alter
AssigneeBryan Hughes
Created2012-08-22T16:14:43.000+0000
Updated2012-12-05T21:40:42.000+0000

Description

The text set by the value property in textField is being cleared when you focus the textField. Also, textField.value does not have the correct value if it was set durring creation.

Steps to repro (text disappearing):

1. run the code below 2. notice the text in the text field 3. click on the text field 4. notice that the text in the field disappears

Steps to repro (value empty):

1. run the code below 2. click anywhere 3. notice the alert dialog pop up, but the textField has no value 4. type in the text field 5. click again 6. notice that the textField now has a value
var win  = Ti.UI.createWindow({
	backgroundColor: 'white'
});
win.open();

var textField = Ti.UI.createTextField({
	height: 50,
	width: 300,
	backgroundColor: 'yellow',
	value: "some text"
});
win.add(textField);

win.addEventListener('click', function(){
	alert('Value: '+textField.value);
});

Comments

  1. Jon Alter 2012-08-28

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2850 PR rejected, still needs to be fixed.
  2. Bryan Hughes 2012-09-11

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2907
  3. Lokesh Choudhary 2012-12-05

    Verified the issue to be fixed. The text in the textfield does not disappear when we click in the text field. Both cases mentioned in the issue are not reproducible.Thus closing the issue. Titanium studio : 3.0.0.201211301903 SDK Version : 3.0.0.v20121204154658 OS : OSX 10.8.2 Chrome : 21.0.1180.57

JSON Source