[TIMOB-16992] Blackberry : e.source.id returning the wrong source id
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-05-20T06:21:53.000+0000 |
Affected Version/s | Release 3.2.3 |
Fix Version/s | Release 3.3.0 |
Components | BlackBerry |
Labels | defect, module_blackberry, qe-testadded |
Reporter | Sapan Varshney |
Assignee | Pedro Enrique |
Created | 2014-05-20T06:04:05.000+0000 |
Updated | 2014-06-19T12:43:56.000+0000 |
Description
e.source.id is returning the id of the container on which event is attached.It should return the id of the child when the child is clicked. On iOS/android correct behavior is observed where as on BB it is not.
Steps to reproduce:
1. Copy paste the code in classic Project in app.js file and run the app.
2. Click on child(green) view.
Actual Result:
alert showing the id of the container is visible
Expected Result:
alert showing the id of the child should be visible
{Code}
var win = Ti.UI.createWindow({layout: 'vertical'});
var containerView=Ti.UI.createView({
id:'container',
top:200,
height:200,
width:200,
backgroundColor:'red'
});
var childView=Ti.UI.createView({
id:'child',
top:50,
bottom:50,
height:100,
width:100,
backgroundColor:'green'
});
containerView.addEventListener('click',function(e){
alert('source id is:'+e.source.id);
});
containerView.add(childView);
win.add(containerView);
win.open();
{Code}
Attachments
File | Date | Size |
BB.png | 2014-05-20T06:04:06.000+0000 | 41000 |
iOS.png | 2014-05-20T06:04:05.000+0000 | 59001 |
This is essentially a duplicate of TIMOB-16758 This has been fixed in 3.3.0 and cannot be back ported to 3.2.X
Mac OSX 10.9.3 Appcelerator Studio, build: 3.3.0.201405161313 Titanium SDK, build: 3.3.0.v20140520141136 Titanium CLI, build: 3.3.0-alpha4 Alloy:1.4.0-alpha2 BlackBerry SDK, build: 10.2.0.1155 BlackBerry Device: 10.2.1.2947 Used test case provided in description. e.source.id returns "child", the correct source id Closing.