[TIMOB-11841] Android: 'longclick' event data not filled (x, y ...)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2013-03-18T14:20:16.000+0000 |
Affected Version/s | Release 2.1.4, Release 3.0.0 |
Fix Version/s | n/a |
Components | Android |
Labels | exalture, triage |
Reporter | Martin Guillon |
Assignee | Sunila |
Created | 2012-10-16T11:14:14.000+0000 |
Updated | 2017-03-22T21:50:17.000+0000 |
Description
*Actual behavior*
The event data for 'longclick' is not filled, it returns nothing {} (see logs).
*Expected behavior*
The event data should return values like x, y etc.
*Test case*
var win = Ti.UI.createWindow();
win.backgroundColor = 'white';
var view = Ti.UI.createView({
backgroundColor:'red',
width:200,
height:200
})
view.addEventListener('longclick', function(e){
Ti.API.info(JSON.stringify(e))
})
win.add(view);
win.open();
*Log*
[INFO][TiAPI ( 448)] {"type":"longclick","source":{"children":[],"width":200,"keepScreenOn":false,"height":200,"backgroundRepeat":false,"backgroundColor":"red","rect":{"height":200,"y":289,"x":140,"width":200},"bubbleParent":true,"size":{"height":200,"y":0,"width":200,"x":0},"_events":{"longclick":{}}},"bubbles":true,"cancelBubble":false}
pul request https://github.com/appcelerator/titanium_mobile/pull/3247
Tested and confirmed on Samsung Galaxy S2 2.3.6 device and Android emulator 2.3.3 on both 2.1.4 GA and latest 3.0.0 build.
Same problem here, Galaxy Nexus android 4.2 latest 3.0.0 beta2 e.row.id is undefined on longclick.
Can you please give us an ETA?
As per the documentation longClick event doesn't have x and y. Here is the description from documentation "As the trackball can fire this event, it is not intended to return the x and y coordinates of the touch, even when it is generated by the touchscreen."
not the kind of answer you would expect! If thats your choice, will still keep it in my branch as IT IS very useful
Closing ticket as invalid with reference to previous comments.