[TIMOB-14928] iOS: TextField Change event is not being fired when textField value changes on button click.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-04-21T17:49:00.000+0000 |
Affected Version/s | Release 3.1.2, Release 3.1.3 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-3.1.3 |
Reporter | Priya Agarwal |
Assignee | Sabil Rahim |
Created | 2013-08-21T10:04:02.000+0000 |
Updated | 2017-03-20T22:21:49.000+0000 |
Description
This is not a regression.
TextField Change event is not being fired when textField value changes on button click.
var win = Ti.UI.createWindow({
backgroundColor : "#FFF"
});
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);
win.open();
var button = Ti.UI.createButton({
top: 150,
title: "change textfield.value"
});
// Textfield change event does not gets fired but value changes on iOS but on android both value also changes and change event is fired.
button.addEventListener("click", function(){
textField.value = "changed";
});
win.add(button);
Steps to Reproduce:
1)Copy paste the above mentioned code on mobile classic project's app.js.
2)Run the app.
3)Tap on textField.
4)Edit the text.
5)Click the "change textfield.value" button.
Expected Result:
2)Window gets open with textField having value "TestChangeEvent" and "change textfield.value" button.
3)Keyboard gets open.
4)Change event of text field must be fired on every change. Check the console logs.
5)TextField value changes to "Changed" and change event of textField must again fire on console.
Actual Result:
2)Window gets open with textField having value "TestChangeEvent" and "change textfield.value" button.
3)Keyboard gets open.
4)Change event of text field must be fired on every change. Check the console logs.
5)TextField value changes to "Changed" and change event of textField is not fired.
The change event gets fired on changing the value of textfield on button click on android(could get the change event fired on console logs) but for iOS no change event is fired when value of textfield changes on button click.
duplicate of TIMOB-16318
Closing ticket as duplicate.