Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19260] iOS: Tab - focus event fired with no index, previousIndex, tab, previousTab

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterShawn Lan
AssigneeUnknown
Created2015-07-22T23:28:18.000+0000
Updated2018-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);
};

Comments

  1. Shawn Lan 2015-07-28

    On Android, if "focus" happens on the same tab (e.g. brought back from background, another window closed), there properties are undefined as well.

JSON Source