Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16221] iOS: TextField: Change event is not being fired when changing the textField value using Button click

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2014-04-21T17:49:50.000+0000
Affected Version/sRelease 3.2.1
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.2.1
ReporterPriya Agarwal
AssigneeSabil Rahim
Created2014-01-17T11:14:57.000+0000
Updated2017-03-22T22:14:47.000+0000

Description

Change event is not being fired when changing the textField value using Button click. Not a Regression. Since issue occurs in 3.2.0.GA, 3.1.3.GA also. Steps to reproduce: 1. Deploy the test case to device. 2. Tap on textField. Console logs prints logs(change event being fired) 3. Tap on Button. 4. The change event is not fired.(where as in android it gets fired) 5. After that again tap on textfield. Console logs prints logs(change event being fired) Expected Result: The change event of textField should also get fired when value gets changed on button click. Actual Result: Change event not fired. Working fine on Android.
var win = Ti.UI.createWindow({
	backgroundColor : "#FFF"
});

var textField = Ti.UI.createTextField({
	value : 'test123'
});

textField.addEventListener('change', function(e) {
	Ti.API.info("Change Event Fired: " + e.value);
});
var button = Ti.UI.createButton({
	top : 150,
	title : "change textfield.value"
});
button.addEventListener("click", function() {
	textField.value = "changed";
});
win.add(button);
win.add(textField);
win.open(); 

Comments

  1. Sabil Rahim 2014-04-21

    TIMOB-16318
  2. Lee Morris 2017-03-22

    Closing ticket as duplicate and links to the related ticket have been provided above.

JSON Source