Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23989] Android: When the back button is pressed on android it closes the app even if it is not the last window with SDK 6.0.0

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2016-10-17T16:34:54.000+0000
Affected Version/sRelease 6.0.0
Fix Version/sRelease 6.0.0
ComponentsAndroid
Labelsqe-6.0.0, regression
ReporterSamir Mohammed
AssigneeGary Mathews
Created2016-10-05T22:47:20.000+0000
Updated2016-10-25T22:01:35.000+0000

Description

This is a regression.

Steps to reproduce:

1. Use the code below in the app.js
var win = Ti.UI.createWindow();

win.addEventListener('click',function(){
    var win1 = Ti.UI.createWindow({
        backgroundColor:'teal'
    });
    
    win1.open();
});

win.open();
2. Click on the first window. 3. You should see the second window with the background color teal. 4. Press the android back button.

Actual results:

1. The app closes.

Expected results:

1. App should go back to the first window rather than closing.

Comments

  1. Lokesh Choudhary 2016-10-05

    Probably this broke it : https://github.com/appcelerator/titanium_mobile/pull/8465
  2. Gary Mathews 2016-10-13

    master: https://github.com/appcelerator/titanium_mobile/pull/8511
  3. Lokesh Choudhary 2016-10-25

    Verified the fix. Now when the back button is pressed & the windows is not the first window the app does not exit/close. Closing. Appc Studio : 4.8.0.201610171310 SDK Version : 6.0.0.v20161024184632 Mac OS Version : 10.11.6 Xcode Version : Xcode 8.0 Build version 8A218a Appc CLI AND Appc NPM : {"NPM":"4.2.8-9","CLI":"6.0.0-65"} Ti CLI : 5.0.10 Alloy : 1.9.3 Node : v4.6.0 Nexus 6 - Android 6.0.1

JSON Source