Description
Child view elements (Ti.UI.View) are not passed down click and touch events, other elements like label and button are
var win = Ti.UI.createWindow({
backgroundColor: 'green',
layout: 'vertical'
});
var view2 = Ti.UI.createView({
backgroundColor: 'red',
width: '40%', height: '40%',
id: 'view2'
});
view2.addEventListener('click', function (e) {
console.log(e.source.id);
});
win.add(view2);
var btn = Ti.UI.createButton({title: 'I AM BUTTON'});
btn.addEventListener('click', function(e) {
console.log('YOU CLICKED THE BUTTON')
});
win.add(btn);
var lbl = Ti.UI.createLabel({text: 'I AM LABEL'});
lbl.addEventListener('click', function(e) {
console.log('YOU CLICKED THE LABEL')
});
win.add(lbl)
win.open();
Steps to reproduce
Add the above to an existing app.js and build for Windows
Tap the button
Tap the label
Tap the view
Actual
click event fires for label and button but not for view
Expected
click event should fire for all
Rolling back through the SDKs to try and figure out when this broke, so far I'm at the below 6.2.0.v20170405172414 <- works 6.2.0.v20170501120123 <- works 6.2.0.v20170603145912 <- works 6.2.0.v20170705074041 <- broken 6.2.0.v20170720201231 <- broken
Reverted https://github.com/appcelerator/titanium_mobile_windows/pull/1018 and built manually and the code works fine
[~eharris] Thanks for the information! That really helps (y) I'm now rolling back the commits and it seems something around mid June.
So it tuns out [this commit](https://github.com/appcelerator/titanium_mobile_windows/commit/45e68d005da340e58793482876f13f21f504756f) introduces the issue. This prevents
Canvas::Tapped
from working but I don't understand why. Investigating...Reverted PR here https://github.com/appcelerator/titanium_mobile_windows/pull/1100
master: https://github.com/appcelerator/titanium_mobile_windows/pull/1102 6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1103
Verified in 6.2.0.GA and 7.0.0.v20170912234515