Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8554] MobileWeb: TableView scroll event doesn't return correct information

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-06-14T15:18:39.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 MW
ComponentsMobileWeb
Labelsparity
ReporterArthur Evans
AssigneeChris Barber
Created2012-04-05T12:36:21.000+0000
Updated2017-03-09T01:15:17.000+0000

Description

Logged output from the TableView 'scroll' event and noted the following: - contentOffset has an x value, but no y value--not very useful, since the tableview only scrolls vertically. - totalItemCount returns 1 instead of the total number of rows (31). - visibleItemCount returns 0 (?!) which just ain't right.
[INFO] Got event type[scroll]: {
  "contentOffset": {
    "x": 0
  },
  "contentSize": {
    "width": 1329,
    "height": 1583
  },
  "size": {
    "width": 1329,
    "height": 743
  },
  "totalItemCount": 1,
  "visibleItemCount": 0,
  "x": 507,
  "y": 69
}
index.html:10432[INFO] Got event type[scroll]: {
  "contentOffset": {
    "x": 0
  },
  "contentSize": {
    "width": 1329,
    "height": 1583
  },
  "size": {
    "width": 1329,
    "height": 743
  },
  "totalItemCount": 1,
  "visibleItemCount": 0,
  "x": 507,
  "y": 57
}

Comments

  1. Jeff English 2012-05-30

    Not having the correct values (especially contentOffset.y) makes it difficult to implement "infinite-scrolling" / "pull-to-load" logic. I'm seeing a key for contentOffset.y but it's value is undefined (running on Chrome browser). Also note that the contentOffset.y value is correct for the 'scrollEnd' event, just not the 'scroll' event.
  2. Bryan Hughes 2012-06-12

    Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2376
  3. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source