[TIMOB-24225] Android: close event is not fired when a window is closed
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-12-22T15:47:53.000+0000 |
Affected Version/s | Release 6.1.0 |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | qe-6.1.0, regression |
Reporter | Gary Mathews |
Assignee | Gary Mathews |
Created | 2016-12-14T15:58:35.000+0000 |
Updated | 2017-01-23T16:37:39.000+0000 |
Description
Closing a
Titanium.UI.Window
does not fire the close
event.
*TEST CASE*
var b = Ti.UI.createWindow({backgroundColor: 'red'}),
w = Ti.UI.createWindow({backgroundColor: 'yellow'});
w.addEventListener('close', function () {
b.setBackgroundColor('green');
});
b.addEventListener('open', function () {
w.addEventListener('open', function() {
setTimeout(function () {
w.close();
}, 500);
});
w.open();
});
b.open();
*Actual*
- Window is red
*Expected*
- Window is green
master: https://github.com/appcelerator/titanium_mobile/pull/8685
Verified as fixed, Close event is now fired. Tested on: {noformat} macOS Sierra 10.12.2 Nexus 5X (6.0.1) Pixel Xl (7.1.1) android emulator (4.4.2, 6.0) Ti SDK: 6.1.0.v20170103224205 Appc CLI: 6.1.0 Appc NPM: 4.2.8 Node v4.6.0 {noformat} *Closing Ticket.*