Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24531] Android: onBackPressed behaviour does not work correctly

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-03-24T21:11:03.000+0000
Affected Version/sRelease 6.0.3
Fix Version/sRelease 6.0.4
ComponentsAndroid
Labelsprimary
ReporterGary Mathews
AssigneeGary Mathews
Created2017-03-24T13:28:39.000+0000
Updated2017-04-13T07:53:29.000+0000

Description

Additional windows will close when the back button is pressed even when exitOnClose is not specified. *TEST CASE*
var win = Ti.UI.createWindow({
    backgroundColor: '#fff'
});

var lbl = Ti.UI.createLabel({
	text:"window 1"
})

var btn = Ti.UI.createButton({
	title:"create",
	bottom:10
});

btn.addEventListener("click",function(){
	var win2 = Ti.UI.createWindow({
	    backgroundColor: '#fff'
	});
	var lbl2 = Ti.UI.createLabel({
		text:"Close to go to window 1", color:"#000"
	});
	win2.add(lbl2);
	win2.open();
})

win.add(btn);
win.add(lbl);
win.open();

Comments

  1. Gary Mathews 2017-03-24

    master: https://github.com/appcelerator/titanium_mobile/pull/8906 6_0_X: https://github.com/appcelerator/titanium_mobile/pull/8907
  2. Lokesh Choudhary 2017-03-24

    FR done. PR https://github.com/appcelerator/titanium_mobile/pull/8907 & https://github.com/appcelerator/titanium_mobile/pull/8906 merged.
  3. Lokesh Choudhary 2017-03-24

    Verified the fix in SDK 6.0.4.v20170324115015 & 6.1.0.v20170324141428. Closing.

JSON Source