[TIMOB-13564] BlackBerry : We get same index for 'OK' & 'Cancel' button on an alert dialog
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-04-22T23:46:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 09 BB, 2013 Sprint 09, Release 3.2.0 |
Components | BlackBerry |
Labels | qe-testadded, sdk-bb |
Reporter | Lokesh Choudhary |
Assignee | Josh Roesslein |
Created | 2013-04-15T20:17:41.000+0000 |
Updated | 2014-06-19T12:43:48.000+0000 |
Description
Description:
1. Create an app for BB
2. Replace the code in the app.ja with the following code:
Ti.API.info('running');
var win = Ti.UI.createWindow({backgroundColor: 'red'});
win.open();
function showAlert() {
Ti.API.info('opening alert...');
var alert1 = Ti.UI.createAlertDialog({
title: 'Click a button...'
});
alert1.addEventListener('click', function(e) {
alert('index = ' + e.index);
});
alert1.show();
}
setTimeout(showAlert, 2000);
2. Build & run on BB device/simulator
3. The app launches
4. You will get an alert dialog qith a dialog 'click a button'
5. After taping on OK 0r Cancel button on the first alert dialog you will get another alert dialog with the index of the tapped button
Actual Result:
1.Notice that tapping on both OK or Cancel gives us the same index i.e '0'
Expected Result;
1. Both the OK & Cancel buttons should not have same index.
Now the alert dialog has only one button 'OK' as parity with the other platforms.
Verified the issue & now we have only one button 'OK' on the alert dialog as parity with other platforms. Thus we only see index '0'. Thus closing the issue. Environment: Ti Studio : 3.1.1.201305031650 Ti BB SDK : 3.2.0.v20130506213759 Mac OSX : 10.8.2 BB simulator : 10.0.10.261 Q10 Simulator : 10.1.0.1020
Verified on build 3.1.1.v20130507184555 & it works as expected.