Problem Description
I have test this issue with provided test code. I got this bug. When I clicked on tab its not firing focus event. But when I removed playerWindow.open() its working well. It’s working well for 3.1.2 GA and 3.1.1 GA.
Test case
function ApplicationTabGroup(Window) {
//create module instance
var self = Ti.UI.createTabGroup();
var topWindow = Ti.UI.createWindow({
width : '100%',
});
//create app tabs
var win1 = new Window(L('home')), win2 = new Window(L('settings'));
var tab1 = Ti.UI.createTab({
title : L('home'),
icon : '/images/KS_nav_ui.png',
window : win1
});
win1.containingTab = tab1;
var tab2 = Ti.UI.createTab({
title : L('settings'),
icon : '/images/KS_nav_views.png',
window : win2
});
win2.containingTab = tab2;
self.addTab(tab1);
self.addTab(tab2);
self.addEventListener('open', function(e) {
var playerWindow = Ti.UI.createWindow({
width : '100%',
height : 150,
bottom : 0,
backgroundColor : '#e5e5e5',
visible : false,
layout : 'vertical',
zIndex : 100
});
playerWindow.open();
});
tab1.addEventListener('focus', function(e) {
alert('1 Focus');
});
tab2.addEventListener('focus', function(e) {
alert('2 Focus - this should fire, but it does not');
});
return self;
};
module.exports = ApplicationTabGroup;
Steps to reproduce*
1. Create default tabbed application in Titanium Classic
2. Open ApplicationTabGroup.js file and replace with my test code
3. Run this apps
4. Click on settings tab, focus event not firing
5. Now change Ti SDK 3.1.3 GA to 3.1.2 GA
6. Continue step 3 to 4
7. Remove playerWindow.open(); script form test code and follow step 6
Test Case
It doesn't work on the latest 3.1.4.v20131002082601 SDK either.
Issue exist with TiSDK 3.1.3.GA and 3.4.0 Appcelerator Studio, build: 3.3.0.201407111535 iOS 7.1