Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17035] BlackBerry: ScrollView:EventListener-click event does not fire

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-05-27T23:23:55.000+0000
Affected Version/sRelease 3.3.0
Fix Version/sn/a
ComponentsBlackBerry
Labelsmodule_scrollview, qe-3.3.0, qe-testadded, regression
ReporterOlga Romero
AssigneePedro Enrique
Created2014-05-27T23:17:24.000+0000
Updated2014-06-19T12:43:44.000+0000

Description

To reproduce

1. Create the default app and replace app.js with the code below
var win = Ti.UI.createWindow({
    backgroundColor: 'white'
});
 
var scrollView = Ti.UI.createScrollView({
    backgroundColor: 'white',
    layout: 'vertical',
    contentWidth: Ti.UI.FILL,
    contentHeight: Ti.UI.SIZE
});
 
for(var i = 0; i < 20; i++) {
    var btn = Ti.UI.createButton({
        top: 10,
        title: 'Hello'
    });
    scrollView.add(btn);
}
 
win.add(scrollView);
 
scrollView.addEventListener('click', function(e){
    Ti.API.info(JSON.stringify(e));
});
 
win.open();
2. Build for BB device 3. Scroll view outside labels and observe the console output

Actual result

no output

Expected result

similar to this
[INFO] {"x":694,"y":598,"source":{}}
output in the console which indicates the coordinates of your touch on the scrollview

Note

changing 'click' to 'touchstart' will fire
[INFO] {"type":"touchstart","x":294,"y":401,"source":{}}
[INFO] {"type":"touchstart","x":290,"y":439,"source":{}}
[INFO] {"type":"touchstart","x":292,"y":397,"source":{}}

Comments

  1. Pedro Enrique 2014-05-27

    Fixed with the PR from TIMOB-14251
  2. Olga Romero 2014-06-16

    Tested using Mac osx 10.9.3 Mavericks Appcelerator Studio, build: 3.3.0.201406111952 Titanium SDK, build: 3.3.0.v20140613161751 Node.JS Version: v0.10.13 NPM Version: 1.3.2 acs@1.0.14 alloy@1.4.0-rc npm@1.3.2 titanium@3.3.0-rc titanium-code-processor@1.1.1 Device: BB Z10 (10.2.1) EventListener-click event does fire
       [INFO] {"type":"click","x":284,"y":436,"source":{"backgroundColor":"white","layout":"vertical","contentWidth":"UI.FILL","contentHeight":"UI.SIZE"}}
       [INFO] {"type":"click","x":283,"y":436,"source":{"backgroundColor":"white","layout":"vertical","contentWidth":"UI.FILL","contentHeight":"UI.SIZE"}}
       

JSON Source