{ "id": "99095", "key": "TIMOB-10424", "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": "2012-11-28T02:59:02.000+0000", "created": "2012-08-13T13:38:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "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" }, "inwardIssue": { "id": "99096", "key": "TIMOB-10425", "fields": { "summary": "MobileWeb: TableView scroll event has bad data", "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 } } } }, { "id": "19975", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "99330", "key": "TIMOB-10472", "fields": { "summary": "MobileWeb: printing event object causes Uncaught TypeError: Converting circular structure to JSON", "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": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-01-28T23:23:13.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 eventually receive the exception:\r\n\r\nUncaught type error: trying to convert circular structure to JSON.\r\n\r\nI am not seeing this on any other platform.\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 receiving circular data structure", "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": "214158", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "UI controls have to have cyclic data structures for performance reasons. Namely each control must know who it's parents are, and who its children are, meaning that a parent points to its child who points to its parent who points to its child, ad nauseum.", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-13T14:01:10.000+0000", "updated": "2012-08-13T14:01:10.000+0000" }, { "id": "214339", "author": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This may be crazy, but couldn't we add a toJSON method to View or Element that omits any properties starting with underscore?\r\n\r\nI realize it's not absolutely necessary, but not crashing when someone calls stringify on an event object would be a good thing.\r\n", "updateAuthor": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T10:24:01.000+0000", "updated": "2012-08-14T10:24:01.000+0000" }, { "id": "214520", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening this bug as we should evaluate the possible alternate implementations. It does not look right when it works on other platforms but crashes on Mobile Web platform.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-14T20:11:35.000+0000", "updated": "2012-08-14T20:12:29.000+0000" }, { "id": "228789", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "We aren't going to fix this. You cannot JSON.stringify UI elements. They reference parent and child nodes which would be a massive undertaking to re-architect Mobile Web to make JSON.stringify happy.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-11-28T02:59:02.000+0000", "updated": "2012-11-28T02:59:02.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }