Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16318] TextField: Events - 'change' event does not get fired if you change TextField.value from a Button 'click' callback

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionNot Our Bug
Resolution Date2014-04-07T23:52:01.000+0000
Affected Version/sRelease 3.2.0, Release 3.2.1
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.2.1
ReporterWilson Luu
AssigneeSabil Rahim
Created2014-01-27T18:49:48.000+0000
Updated2017-03-28T23:00:25.000+0000

Description

*Details:* 'change' event does not get fired if you change TextField.value from a Button 'click' callback. *This is not a regression as this occurs with SDK 3.2.0.GA.* *Steps to reproduce:* 1. Install the following app.js to an iOS device
var win = Ti.UI.createWindow({
	backgroundColor: 'white'
});

var textField = Ti.UI.createTextField({
	top : 10,
	value : 'TestChangeEvent'
});

textField.addEventListener('change', function(e) {
	Ti.API.info("Change Event Fired: " + e.value);
});

win.add(textField);

var button = Ti.UI.createButton({
	top : 150,
	title : "change textfield.value"
});

button.addEventListener("click", function() {
	textField.value = "changed";
});

win.add(button);
win.open();
2. While having the Xcode console up, press on the "change textfield.value" button *Actual:* "Change Event Fired" does not appear in the Xcode console. *Expected:* "Change Event Fired" should appear in the Xcode console whether you change the textField.value by typing something different or from the button.

Attachments

FileDateSize
textfieldtest.zip2014-04-07T23:45:10.000+000070186

Comments

  1. Sabil Rahim 2014-04-07

    Looks like this is a native behavior. We actually do not get any of the native delegate callbacks when the textfield text is changed programmatically. Marking ticket as "NOT OUR BUG" Native Test app used for testing attached on ticket.
  2. Lee Morris 2017-03-28

    Closing ticket as the issue mentioned is not our bug.

JSON Source