[TIMOB-13337] Android: Event 'change' only fired when user interacts (since of 3.0.0)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-09T23:02:11.000+0000 |
Affected Version/s | Release 3.0.0, Release 3.0.2 |
Fix Version/s | 2013 Sprint 07 |
Components | Android |
Labels | regression, triage |
Reporter | Mathias Immerkær |
Assignee | Hieu Pham |
Created | 2013-01-23T13:05:24.000+0000 |
Updated | 2017-03-21T21:36:21.000+0000 |
Description
As of 3.0.0 event 'change' is only fired when the user interacts directly and not when other parts of the program changes a value.
Try running the following code in 3.0.0 and 2.1.4 and you will notice the difference.
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var textField = Ti.UI.createTextField({
color:'#000',
top:10,
width:400,
height:'auto'
});
win1.add(textField);
textField.addEventListener('change',function(e){
alert("I've changed!");
});
var button = Titanium.UI.createButton({
title: 'Push me!',
width: 100,
height: 50
});
button.addEventListener('click',function(e)
{
textField.value = "1234";
});
win1.add(button);
tabGroup.addTab(tab1);
tabGroup.open();
Unable to reproduce on latest master. Closing issue.
Probably fixed by TIMOB-12139.
Closing ticket as the issue cannot be reproduced and due to the above comments.