[TIMOB-19260] iOS: Tab - focus event fired with no index, previousIndex, tab, previousTab
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Shawn Lan |
Assignee | Unknown |
Created | 2015-07-22T23:28:18.000+0000 |
Updated | 2018-02-28T19:55:32.000+0000 |
Description
To re-produce, create a two-tabbed alloy project with the following:
index.xml
<Alloy>
<TabGroup>
<Tab title="Tab 1" icon="KS_nav_ui.png" onFocus="tabFocus">
<Window title="Tab 1">
<Label>I am Window 1</Label>
</Window>
</Tab>
<Tab title="Tab 2" icon="KS_nav_views.png">
<Window title="Tab 2">
<Label>I am Window 2</Label>
</Window>
</Tab>
</TabGroup>
</Alloy>
index.js
$.index.open();
var tabFocus = function(e){
Ti.API.info(e.index+' '+e.previousIndex);
};
On Android, if "focus" happens on the same tab (e.g. brought back from background, another window closed), there properties are undefined as well.