{ "id": "122856", "key": "TIMOB-15849", "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-29T18:40:10.000+0000", "created": "2013-11-24T12:32:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "MobileWeb", "TableView", "TableViewRow", "TableViewSection" ], "versions": [ { "id": "15593", "description": "Release 3.1.3", "name": "Release 3.1.3", "archived": true, "released": true, "releaseDate": "2013-09-18" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2018-04-04T23:20:21.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": "h4. Problem Description \r\n\r\nThis bug exists only on mobile web, not on Android on iOS.\r\n\r\nScreenshot of browser and description of bug\r\n\r\n!http://i.imgur.com/4O6TWd4.png!\r\n\r\n* If you click on \"One\", you'll see an alert for index 0, as expected.\r\n* If you click on \"Three\", you'll see an alert for index 1, as expected.\r\n* If you click on \"Two\", you'll see an alert for index 2, as expected.\r\n* If you click on \"Four\", you'll see an alert for index 2, **NOT AS EXPECTED**\r\n* And indeed, if you add more rows to the \"Evens\" section, they will all alert index 2.\r\n\r\nAlso, the same problem occurs if I create the rows and sections using XML only.\r\n\r\n\r\nh4. Test case\r\n\r\n{code:javascript}\r\n win = Titanium.UI.createWindow({\r\n\tbackgroundColor : '#fff',\r\n\texitOnClose : true\r\n});\r\n\r\nvar aTableView = Ti.UI.createTableView();\r\n\r\nvar sections = [];\r\nsections.push(Ti.UI.createTableViewSection({\r\n\theaderTitle : \"Odds\"\r\n}));\r\nsections[0].add(makeTableViewRow(\"One\"));\r\nsections[0].add(makeTableViewRow(\"Three\"));\r\nsections.push(Ti.UI.createTableViewSection({\r\n\theaderTitle : \"Evens\"\r\n}));\r\nsections[1].add(makeTableViewRow(\"Two\"));\r\nsections[1].add(makeTableViewRow(\"Four\"));\r\naTableView.setData(sections);\r\n\r\nfunction makeTableViewRow(rowText) {\r\n\treturn Ti.UI.createTableViewRow({\r\n\t\ttitle : rowText,\r\n\t\tclassName : \"row\"\r\n\t});\r\n}\r\n\r\naTableView.addEventListener('click', function(e) {\r\n\talert( e.index);\r\n});\r\n\r\nwin.add(aTableView);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\nh5. Steps to reproduce\r\n1.\tCreate a new project\r\n2.\tPaste test code in app.js\r\n3.\tRun on Mobile Web\r\n4.\tClick on 4th Row its alert 2 but actual result 3 \r\n \r\n\r\n", "attachment": [], "flagged": false, "summary": "TableView event.index is wrong when TableView has sections (Mobile Web Only)", "creator": { "name": "jonahx", "key": "jonahx", "displayName": "Jonah G", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jonahx", "key": "jonahx", "displayName": "Jonah G", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "OS: MAC OS X 10.8.5\r\nTi SDK: 3.1.3 GA \r\nTi CLI: 3.2.0 \r\nMobile Web ", "comment": { "comments": [ { "id": "280893", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "I have personally been involved in confirming the findings by Jonah in the Q&A, read the full interaction here;\n\nhttp://developer.appcelerator.com/question/159780/possible-bug-tableview-eventindex-is-wrong-when-tableview-has-sections\n\nI have confirmed the error does occur and that it only occurs in Mobile Web as other platforms report the correct response for the test case above.", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2013-11-24T12:38:42.000+0000", "updated": "2013-11-24T12:38:42.000+0000" }, { "id": "280894", "author": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "body": "Most recent builds tested with;\n\nTi SDK 3.2.0.v20131117001643\nTi Studio 3.2.1.201311211948", "updateAuthor": { "name": "core13", "key": "core13", "displayName": "Malcolm Hollingsworth", "active": true, "timeZone": "Europe/London" }, "created": "2013-11-24T12:41:24.000+0000", "updated": "2013-11-24T12:41:24.000+0000" }, { "id": "281356", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Jonah,\r\nCan you please post a test case that reproduces the issue in the form of a single app.js file? \r\n\r\nTIA!\r\n\r\nBest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-26T06:42:06.000+0000", "updated": "2013-11-26T06:42:06.000+0000" }, { "id": "281364", "author": { "name": "jonahx", "key": "jonahx", "displayName": "Jonah G", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Mauro,\n\nSorry, I'm in like my first week of learning appcelerator and only know how to make things with the Alloy style. However, it literally takes under 60 seconds to create a new Alloy project, paste in my 3 code snippets into .js, .tss, and .xml files, and see the error in action. \n\nHTH,\nJonah", "updateAuthor": { "name": "jonahx", "key": "jonahx", "displayName": "Jonah G", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-26T06:51:49.000+0000", "updated": "2013-11-26T06:51:49.000+0000" }, { "id": "423168", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving 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-29T18:40:10.000+0000", "updated": "2017-06-29T18:40:10.000+0000" }, { "id": "436336", "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:21.000+0000", "updated": "2018-04-04T23:20:21.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }