[TIMOB-10401] MobileWeb: Tab: window property not respected post-initialization
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2017-06-26T22:12:29.000+0000 |
Affected Version/s | Release 2.1.0, Release 2.1.1, Release 2.1.2 |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | api, parity, qe-mw082012 |
Reporter | Dustin Hyde |
Assignee | Eric Merriman |
Created | 2012-08-10T14:18:09.000+0000 |
Updated | 2017-08-24T20:53:03.000+0000 |
Description
Ti.UI.Tab.window and setWindow are not respected.
Uncaught TypeError: Object [object TiUITab] has no method 'setWindow'
This is not a regression. This works on iOS and Android.
Steps to Reproduce:
1. Run code:
var mainTabGroup = Ti.UI.createTabGroup();
var mainTab1 = Ti.UI.createTab({
backgroundColor : 'green'
});
var mainWin1 = Ti.UI.createWindow({
backgroundColor : 'yellow'
});
mainTab1.window = mainWin1; // ignored
// mainTab1.setWindow(mainWin1); // runtime error
mainTabGroup.addTab(mainTab1);
var mainTab2 = Ti.UI.createTab({
backgroundColor : 'red'
});
var mainWin2 = Ti.UI.createWindow({
backgroundColor : 'blue'
});
// mainTab2.window = mainWin2; // ignored
mainTab2.setWindow(mainWin2); // runtime error
mainTabGroup.addTab(mainTab2);
mainTabGroup.open();
Actual Result:
window property is ignored or setWindow method generates runtime error
Expected Result:
A tab group should open with colored tabs and colored windows.
Note: windows do work at tab initialization. Here is sample work-around code:
This problem still exists, and now using alloy, I can not set the contents of the Window, unless its in my XML markup, I'm pretty sure this problem still exists. eg, I can not set the window property of the tab to a [TiUIWindow] object - which works on both iOS and Android, in some instances I have to use the tab.setWindow method (which results in an error on Mobile Web)
Mobile Web has been deprecated and will be removed in fixVersion 7.0.0.