[TIMOB-9324] iOS: Ti.UI.Switch control fires 'change' event on view loading.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-01T11:38:46.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | Release 3.0.2 |
Components | iOS |
Labels | community |
Reporter | Dino Bartosak |
Assignee | Shameer Jan |
Created | 2012-05-24T11:12:33.000+0000 |
Updated | 2017-03-21T21:27:34.000+0000 |
Description
When Ti.UI.Switch control is added to some view it fires 'change' even first time.
Expected behavior is that it fires 'change' event only when user clicks on it.
Tested with Titanium SDK 2.1.0 on iOS 5.0 Simulator
var win = Ti.UI.createWindow();
var simpleSwitch = Ti.UI.createSwitch({
value : false
})
win.add(simpleSwitch);
simpleSwitch.addEventListener('change', function(e) {
alert('Switch value: ' + e.value)
})
win.open();
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced.