Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25261] Windows: Click and touch events not being passed down to child view

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-09-14T02:04:34.000+0000
Affected Version/sRelease 7.0.0, Release 6.2.0
Fix Version/sRelease 6.2.0
ComponentsWindows
Labelsregression
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-09-11T11:03:58.000+0000
Updated2017-09-15T12:32:49.000+0000

Description

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

Comments

  1. Ewan Harris 2017-09-11

    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
  2. Ewan Harris 2017-09-11

    Reverted https://github.com/appcelerator/titanium_mobile_windows/pull/1018 and built manually and the code works fine
  3. Kota Iguchi 2017-09-11

    [~eharris] Thanks for the information! That really helps (y) I'm now rolling back the commits and it seems something around mid June.
  4. Kota Iguchi 2017-09-12

    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...
  5. Ewan Harris 2017-09-12

    Reverted PR here https://github.com/appcelerator/titanium_mobile_windows/pull/1100
  6. Gary Mathews 2017-09-12

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/1102 6_2_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1103
  7. Ewan Harris 2017-09-14

    Verified in 6.2.0.GA and 7.0.0.v20170912234515

JSON Source