[TIMOB-1637] iOS: Controls fire 'change' event on initial value set
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-25T16:18:51.000+0000 |
Affected Version/s | Release 1.5.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | parity |
Reporter | Stephen Tramer |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:58:02.000+0000 |
Updated | 2012-07-26T22:22:55.000+0000 |
Description
Controls fire a 'change' event when the value is initially set. We should probably find a way to suppress this.
Comments
- Don Thorp 2011-11-05 If the event listener is added and then the value changed, this seems like correct behavior even if it's initial value.
- Stephen Tramer 2012-07-25
Could not reproduce in SDK 2.2.0.f9e938d on iPhone Sim 5.1.
Test code (based on 'switch' control):
var win = Ti.UI.createWindow(); var s = Ti.UI.createSwitch({ value:true, width:Ti.UI.SIZE, height:Ti.UI.SIZE }); s.addEventListener('change', function() { Ti.API.info("Value changed!"); }); win.add(s); win.open();