Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24573] [iOS] View inside another view does not fire events

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2017-04-12T15:17:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterBrian García
AssigneeHans Knöchel
Created2017-04-12T13:59:58.000+0000
Updated2017-05-31T23:18:31.000+0000

Description

Adding a view inside another view does not fire events of the child view. tested with views and labels. code to reproduce :
var containerView = Ti.UI.createView({
    borderColor : 'green',
    height : 300,
    width : 300,
});
var view = Ti.UI.createView({
    height : 200,
    width : 200,
    borderColor : 'red',
    bubbleParent : true
});
var label = Ti.UI.createLabel({
    text : 'Click me',
    height : 50,
    width : 80,
    borderColor : 'blue',
    bubbleParent : true
});

view.add(label);

containerView.addEventListener('click', function(e) {

    console.log(e.source);
});
containerView.add(view);
$.win.add(containerView);
in the test case if you click in the label or in the inner view click event does not fire. If you click outside it does.

Comments

  1. Hans Knöchel 2017-04-12

    I remember this was in issue before but I think it's fixed for 6.1.0 already (TIMOB-23934). Can you try 6.1.0? Then we'd consider to backport it to 6.0.4.
  2. Brian García 2017-04-12

    Works with latest master (6.2.0.v20170412004044). Works with latest 6.1.0 (6.1.0.v20170410104407) and it's working. Thanks!
  3. Lee Morris 2017-05-31

    Closing ticket as duplicate.

JSON Source