Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1701] XML: Unable to use platform namespace restriction on event handlers

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2019-11-19T11:30:08.000+0000
Affected Version/sAlloy 1.14.0
Fix Version/sCLI Release 7.1.2
Componentsn/a
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2019-08-20T13:52:10.000+0000
Updated2019-11-19T11:30:08.000+0000

Description

Description

ALOY-1646 introduced support for namespacing an xml attribute to restrict a property to a single platform, this does not work for event handlers as they are handled separately to where this is done.
<Alloy>
	<Window android:onClick="doClick">
	</Window>
</Alloy>
function doClick(e) {
	console.log('clicky click')
};

$.index.open();

Steps to reproduce

1. Add the above to your index.xml/index.js files 2. Build to Android

Actual

No event listener is attached

Expected

Event listener should be attached

Comments

  1. Ewan Harris 2019-10-03

    PR https://github.com/appcelerator/alloy/pull/940
  2. Samir Mohammed 2019-11-19

    *Closing ticket.* Fix verified in CLI Version "NPM":"4.2.15-1","CLI":"7.1.2-7". Tested using the instructions mentioned above. *Test Environment*
       MacOS Catalina 10.15.1 beta
       Xcode 11 
       Node.js 10.16.3
       Pixel XL 7.1.1 Sim
       "NPM":"4.2.15-1","CLI":"7.1.2-7"
       SDK Version 8.3.0.v20191114073239
       

JSON Source