Project: titanium
Issue TIMOB-19208: Windows: CommandBar disappears after closing overlapping Window
{{Window.CommandBar}} which is associated with {{Ti.UI.Window}} disappears when creating new {{Window}} from {{Tab}}. For example in following sample code the CommandBar which is associated with {{win1}} disappears after closing overlapping Window. It's ok to hide it when overlapping Window is active, but it should restored when overlaping Window is closed. {code} var tabGroup = Titanium.UI.createTabGroup(); var win1 = Titanium.UI.createWindow({ title: 'Tab 1', backgroundColor: '#fff' }); var tab1 = Titanium.UI.createTab({ icon: 'KS_nav_views.png', title: 'Tab 1', window: win1 }); var label1 = Titanium.UI.createLabel({ color: '#999', text: 'I am Window 1', font: { fontSize: 20, fontFamily: 'Helvetica Neue' }, textAlign: 'center', width: 'auto' }); win1.add(label1); var platform = Ti.Platform.osname; if (platform === 'windowsphone' || platform === 'windowsstore') { var commandBar1 = Ti.UI.Windows.createCommandBar(); var addButton = Ti.UI.Windows.createAppBarButton({ icon: Ti.UI.Windows.SystemIcon.ADD }); addButton.addEventListener('click', function () { var window = Ti.UI.createWindow({ backgroundColor: 'green' }); var closeButton = Ti.UI.createButton({ title: 'Close' }); closeButton.addEventListener('click', function () { window.close(); }); window.add(closeButton); window.open(); }); commandBar1.items = [addButton]; win1.add(commandBar1); } tabGroup.addTab(tab1); tabGroup.open(); {code}
Story points: 8