[TIMOB-8554] MobileWeb: TableView scroll event doesn't return correct information
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-06-14T15:18:39.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 MW |
Components | MobileWeb |
Labels | parity |
Reporter | Arthur Evans |
Assignee | Chris Barber |
Created | 2012-04-05T12:36:21.000+0000 |
Updated | 2017-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
}
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.
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/2376
Closing ticket as fixed.