Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15159] iOS: Adding child window to parent window does not display

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2013-09-13T23:24:27.000+0000
Affected Version/sRelease 3.1.3, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
LabelsiOS7, mobilesdk, titanium
ReporterAshish Nigam
AssigneeSabil Rahim
Created2013-09-13T12:02:27.000+0000
Updated2017-03-17T18:04:24.000+0000

Description

When we add one window object to another parent window object, then child window object is not visible. *Steps to reproduce* 1: Use the below sample code and copy paste it in app.js 2: Run the project. 3: click on *open added window* button. 4: using 3.1.3 SDK, only parent window i.e. yellow colored window will be displayed. Note: Using 3.1.2.GA SDK both parent and child windows are displayed. i.e. yellow and red colored windows are displayed. *Sample code*
var win1 = Ti.UI.createWindow({
	backgroundColor : "gray"
});

var btn = Ti.UI.createButton({
	top:20,
	left:20,
	height:100,
	width:200,
	title : "open added window"
});

btn.addEventListener("click", function() {
	var win2 = Ti.UI.createWindow({
		backgroundColor : "yellow"
	});

	var win3 = Ti.UI.createWindow({
		top:100,
		left:100,
		height:180,
		width:200,
		backgroundColor : "red"
	});
	
	win2.add(win3);
	
	win2.open();
});

var btn1 = Ti.UI.createButton({
	top:220,
	left:20,
	height:100,
	width:200,
	title : "open new single window"
});

btn1.addEventListener("click", function() {
	var win2 = Ti.UI.createWindow({
		backgroundColor : "pink"
	});
	
	win2.open();
});


win1.add(btn);
win1.add(btn1);

win1.open();

Comments

  1. Vishal Duggal 2013-09-13

    This is a conscious change and part of ios windows refactor. Windows are not supposed to be children of other views. We have explicitly disabled this in 3.1.3 and above.
  2. Lee Morris 2017-03-17

    Closing ticket as invalid.

JSON Source