Titanium JIRA Archive
Alloy (ALOY)

[ALOY-305] Event callbacks defined in markup are not working for Windows defined in NavigationGroup

GitHub Issuen/a
TypeBug
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2012-09-27T20:37:30.000+0000
Affected Version/sn/a
Fix Version/s2012 Sprint 20, Release 3.0.0
ComponentsXML
Labelsn/a
ReporterBenjamin Hatfield
AssigneeUnknown
Created2012-09-27T17:25:23.000+0000
Updated2018-03-07T22:25:50.000+0000

Description

REPRODUCTION: See code below. Ran on iPhone emulator. RESULTS: Click event (as well as others) is not executing the callback. WORKAROUNDS: Place "win2" inside it's own view and require it in the main view. Callbacks work. Also, using the $.win2.on or $.win2.addEventListener method work in the controller. index.xml:
<Alloy>
	<Window>
		<NavigationGroup id="nav" platform="ios,mobileweb">
			<Window id="win2" title="Red Window" backgroundColor="red" onClick="report" />
		</NavigationGroup>
	</Window>
</Alloy>
index.js:
function report (e) {
	Ti.API.info("event fired:" + e.type);	
}
$.index.open();

Comments

  1. Tony Lukasavage 2012-09-27

    Fixed in NavGroup and SplitWindow. No other current parsers contained this error. Fix will be available in 0.2.36 soon.

JSON Source