Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25327] Windows: currentPage property of scrollableview.scrollend event is always 0

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-10-04T15:39:30.000+0000
Affected Version/sRelease 7.0.0, Release 6.3.0, Release 6.2.0
Fix Version/sRelease 7.0.0
ComponentsWindows
Labelsn/a
ReporterEwan Harris
AssigneeKota Iguchi
Created2017-09-21T10:25:28.000+0000
Updated2017-11-17T01:44:36.000+0000

Description

Description

When using the scrollend event, the currentPage event is always set to 0, it should be the index of the currently visible view
var win = Ti.UI.createWindow();
var view1 = Ti.UI.createView({ backgroundColor:'#123' });
var view2 = Ti.UI.createView({ backgroundColor:'#246' });
var view3 = Ti.UI.createView({ backgroundColor:'#48b' });
var scrollableView = Ti.UI.createScrollableView({
  views:[view1,view2,view3],
  showPagingControl:true
});
scrollableView.addEventListener('scrollend', function(e) {
    console.log(e.currentPage)
})
win.add(scrollableView);
win.open();

Steps to reproduce

Add to an existing app.js and build for Windows

Scroll the view

Actual

When finishing scrolling the currentPage property is always 0

Expected

currentPage property should be index of the current view

Comments

  1. Kota Iguchi 2017-10-03

    https://github.com/appcelerator/titanium_mobile_windows/pull/1128 CR passed.
  2. Abir Mukherjee 2017-11-17

    Tested on SDK 7.0.0.v20171116132144 installed from CLI. Fix is verified.

JSON Source