[TIMOB-14751] Android: Modal window is not getting closed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-08-02T22:09:57.000+0000 |
Affected Version/s | Release 3.1.2 |
Fix Version/s | 2013 Sprint 16, 2013 Sprint 16 API, Release 3.1.2, Release 3.2.0 |
Components | Android |
Labels | module_window, qe-3.1.2, qe-closed-3.1.2, qe-testadded, regression |
Reporter | Dhirendra Jha |
Assignee | Ingo Muschenetz |
Created | 2013-08-02T09:16:28.000+0000 |
Updated | 2013-09-19T21:26:02.000+0000 |
Description
Note - This is a regression. Issue is not reproducible in 3.1.1.GA build.
Steps -
1. Run the below app.
2. Press the "Press me" button. A new modal window is displayed.
3. Press the "close" button.
Actual Result - Does not happen anything. It seems that Close button is not tappable.
Expected Result - On Close button, model window should close.
Note - In the below code, there are two win.open() methods. Above code is working fine in 3.1.1.GA build and it fails in 3.1.2.v20130801190110 build. If we remove one win.open() method then the same code works fine in 3.1.1.GA and 3.1.2.v20130801190110 build. Please confirm the correct behavior according to new window architecture change for Android.
var _window = Ti.UI.createWindow({
backgroundColor: 'white',
});
var button = Ti.UI.createButton({
title : 'Press me'
});
button.addEventListener('click', function() {
var button2 = Ti.UI.createButton({
title : 'close'
});
var win = Ti.UI.createWindow({
modal : true,
backgroundColor : '#c96'
});
button2.addEventListener('click', function() {
win.close();
});
win.add(button2);
win.open();
win.open();
});
_window.add(button);
_window.open();
Additional test case:
1. Run code. 2. Should see a tabgroup, but instead it crashes.
PR: https://github.com/appcelerator/titanium_mobile/pull/4531
master PR: https://github.com/appcelerator/titanium_mobile/pull/4531
3_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/4535
Tested above code and verified correct behavior with: Appcelerator Studio, build: 3.1.2.201308021524 Titanium SDK, build: 3.1.2.v20130806104555 Alloy 1.2.0-alpha6 CLI: 3.1.2-alpha Devices: Nexus7(2) Android version 4.3 GalaxyS3 Android version 4.0.4