Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24225] Android: close event is not fired when a window is closed

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-12-22T15:47:53.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sRelease 6.1.0
ComponentsAndroid
Labelsqe-6.1.0, regression
ReporterGary Mathews
AssigneeGary Mathews
Created2016-12-14T15:58:35.000+0000
Updated2017-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

Comments

  1. Gary Mathews 2016-12-14

    master: https://github.com/appcelerator/titanium_mobile/pull/8685
  2. Josh Longton 2017-01-04

    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.*

JSON Source