{ "id": "99096", "key": "TIMOB-10425", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-06-26T18:42:15.000+0000", "created": "2012-08-13T13:38:36.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [ { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [ { "id": "19858", "type": { "id": "10001", "name": "Cloners", "inward": "is cloned into", "outward": "is cloned from" }, "outwardIssue": { "id": "99095", "key": "TIMOB-10424", "fields": { "summary": "MobileWeb: TableView scroll event receiving circular data structure", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2018-04-04T23:20:35.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "When trying to decode tableview scroll events using JSON.stringify, I am seeing some strange data.\r\n\r\nMobileWeb is producing the totalItemCount and visibileItemCount properties that Android generates, but totalItemCount is always 1 and visibleItemCount is always 0. The firstVisibleItem property is not included at all.\r\n\r\nAlso, Mobile Web includes x and y properties with this event. These events were documented erroneously for the other platforms--neither Android nor iOS includes them. These appear to be the x,y coordinates of the user's touch, except that the y property appears to be inverted (i.e., distance from bottom instead of distance from top of view).\r\n\r\nRun the following code to test the events. Note that after a few cycles, this code crashes on mobile web as reported in the linked bug.\r\n\r\nTest code:\r\n\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'black',\r\n\texitOnClose: true,\r\n\tfullscreen: false,\r\n\ttitle: 'TableView Demo'\r\n});\r\n\r\nvar defaultFontSize = Ti.Platform.name === 'android' ? 16 : 14;\r\nvar tableData = [];\r\n\r\nfor (var i=1; i<=20; i++){\r\n\tvar row = Ti.UI.createTableViewRow({\r\n\t\tclassName:'forumEvent',\r\n\t\tselectedBackgroundColor:'white',\r\n\t\theight:110,\r\n\t\ttitle:'Row ' + i\r\n\t});\r\n\r\n\ttableData.push(row);\r\n}\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n\tbackgroundColor:'white',\r\n\tdata:tableData\r\n});\r\ntableView.addEventListener('scroll', function(evt){\r\n\tTi.API.info(\"Got event type[\" + evt.type + \"]: \" + JSON.stringify(evt, function(key, value) {\r\n\t\tif(key === 'source' || key === 'type') {\r\n\t\t\treturn undefined;\r\n\t\t} else {\r\n\t\t\treturn value;\r\n\t\t}\r\n\r\n\t}, 2));});\r\n\r\nwin.add(tableView);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: TableView scroll event has bad data", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "231799", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note: events cannot be JSON.stringified, hence the crash. I'm surprised it worked at all. The key/value pairs of interest need to be logged instead.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-18T02:09:31.000+0000", "updated": "2012-12-18T02:09:31.000+0000" }, { "id": "422771", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Marking ticket as \"Won't Fix\" as MobileWeb has been deprecated.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-26T18:42:15.000+0000", "updated": "2017-06-26T18:42:15.000+0000" }, { "id": "436432", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as will not fix.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-04T23:20:35.000+0000", "updated": "2018-04-04T23:20:35.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }