Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26152] Windows: ScrollView doesn't return correct event source

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2018-06-26T23:43:41.000+0000
Affected Version/sRelease 7.3.0
Fix Version/sRelease 7.3.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2018-06-25T06:06:03.000+0000
Updated2018-06-28T17:31:40.000+0000

Description

ScrollView doesn't return correct source when event listener is added to the scroll view's parent.
var win = Ti.UI.createWindow({
    backgroundColor: 'green',
    width: 800,
    height: 600
});

var view = Ti.UI.createView({
    backgroundColor: 'red',
    width: '80%',
    height: '80%',
    id: 'view'
}),
    view2 = Ti.UI.createScrollView({
        width: '70%', height: '70%', backgroundColor: 'blue', id: 'view2'
    }),
    view3 = Ti.UI.createView({
        width: '70%', height: '70%', backgroundColor: 'pink', id: 'view3'
    });

view2.add(view3);
view.add(view2);

view.addEventListener('click', function (e) {
    alert(e.source.id);
});

win.add(view);
win.open();
Expected: When blue view is clicked, it should show "view2".

Comments

  1. Kota Iguchi 2018-06-25

    https://github.com/appcelerator/titanium_mobile_windows/pull/1260 https://github.com/appcelerator/titanium_mobile_windows/pull/1261
  2. Samir Mohammed 2018-06-28

    *Closing ticket.* Verified fix in SDK Version 7.3.0.v20180627164434 and SDK version 7.4.0.v20180628005853 *FR Passed*

    Created an application with the code in the description

    Ran the program

    Pressed the blue square

    'view 2' was returned

    Pressed the pink view

    'view 3' was returned

    *Test Environment*
       APPC Studio: 5.1.0.201806130735
       version 7.0.4
       Noka lumia 550 (Win 10)
       Operating System:
       Name = Microsoft Windows 10 Pro
       Version = 10.0.15063
       Architecture = 32bit
       CPUs = 4
       Memory = 16.0GB
       Node.js:
       Node.js Version = 8..9.1
       

JSON Source