Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15852] IOS: 'Focus' event fired before 'Open' event

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.1.3
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterShameer Jan
AssigneeUnknown
Created2013-12-02T05:17:41.000+0000
Updated2018-02-28T20:04:08.000+0000

Description

Problem Description

Steps to reproduce 1.Run following code and check console Expected result: 'Focus' event fired after 'Open' event Actual result: 'Focus' event fired before 'Open' event.

Test case

app.js
-------------------


	var win = Ti.UI.createWindow({
		height:100,
		width:100,
		url:'win.js',
		layout:'vertical'
	});
	var nav = Ti.UI.iOS.createNavigationWindow({
		window:win
	});
	var mainWin = Ti.UI.createWindow();
	        var openEvent = 0;
		var focusEvent = 0;
		win.addEventListener('open',function(){
			openEvent += 1;
	});
	win.addEventListener('focus',function(){
		focusEvent += 1;
		Ti.API.info("openEvent"+openEvent);
		Ti.API.info("focusEvent"+focusEvent);
	});
	mainWin.addEventListener('open', function(){
		nav.open();
	});
	mainWin.open();


win.js
-------------------

	var curWin = Ti.UI.currentWindow;
	var l1 = Ti.UI.createLabel({
    	         top:20,
    	         text:'WAITING FOR OPEN EVENT'
	});
	curWin.add(l1);

 

Attachments

FileDateSize
app.js2013-12-02T05:21:38.000+0000736
win.js2013-12-02T05:21:38.000+0000135

Comments

No comments

JSON Source