[TIMOB-9630] Android: AlertDialog: The alert dialog get hidden on tapping on the window outside the alert dialog
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 2.1.0 |
Fix Version/s | n/a |
Components | Android |
Labels | api, qe-and060112, reprod |
Reporter | Satyam Sekhri |
Assignee | Unknown |
Created | 2012-06-19T04:49:13.000+0000 |
Updated | 2018-02-28T20:03:34.000+0000 |
Description
An alert dialog is hidden when tapped outside the alert dialog.
This issue does not occur on Android 2.2
Not a regression. This occurs as far as 1.8.2
Steps to reproduce:
1. Create an application with code below and launch the application
2. Click anywhere on the window
3. After the alert dialog appears click anywhere outside the dialog
Actual: The alert dialog is hidden
Expected: The behavior should be consistent across Android versions
```
Ti.UI.setBackgroundColor('white');
var win = Ti.UI.createWindow({
title: 'Click window to test',
backgroundColor: 'white',
exitOnClose: true,
fullscreen: false
});
win.addEventListener('click', function(e){
var dialog = Ti.UI.createAlertDialog({
cancel: 1,
buttonNames: ['Confirm', 'Cancel', 'Help'],
message: 'Would you like to delete the file?',
title: 'Delete'
});
dialog.addEventListener('click', function(e){
if (e.index === e.source.cancel){
alert('The cancel button was clicked');
}
});
dialog.show();
});
win.open();
{code]
This issue does not occur with android 4.0.4 Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Device: Samsung galaxy s duos Android version: 4.0.4
I am able to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170623141152 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131