{ "id": "75910", "key": "TIMOB-5615", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-09T01:06:17.000+0000", "created": "2011-06-08T07:06:37.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T20:44:24.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": "Method selectRow in tableView does not deselect previously selected row. That is why many rows at the same time can be selected instead of only one at the moment. \r\n{code:JavaScript}\r\nvar win = Ti.UI.currentWindow;\r\nwin.backgroundColor = '#EEE';\r\n\r\n\r\nvar data = [{title:'This is row #1'},\r\n\t\t\t{title:'This is row #2'},\r\n\t\t\t{title:'This is row #3'},\r\n\t\t\t{title:'This is row #4'},\r\n\t\t\t{title:'This is row #5'}];\r\n\r\nvar tableView = Ti.UI.createTableView({\r\n\twidth: 300,\r\n\theight: 200,\r\n\ttop: 155,\r\n\tleft: 10,\r\n\tbackgroundColor: '#AAA',\r\n\tdata:data\r\n});\r\n\r\nvar selRow = Ti.UI.createButton({\r\n\ttitle: 'Select row',\r\n\twidth: 140,\r\n\tfontSize: 16,\r\n\ttop:5,\r\n\theight: 50,\r\n\tleft: 10\r\n});\r\n\r\n\r\nvar deselRow = Ti.UI.createButton({\r\n\ttitle: 'Deselect row',\r\n\twidth: 140,\r\n\tfontSize: 16,\r\n\theight: 50,\r\n\ttop:5,\r\n\tleft: 160\r\n});\r\n\r\nvar deselAll = Ti.UI.createButton({\r\n\ttitle: 'Deselect all',\r\n\twidth: 140,\r\n\tfontSize: 16,\r\n\theight: 50,\r\n\ttop:60,\r\n\tleft: 10\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n\ttop: 115,\r\n\tleft: 53,\r\n\twidth: 100,\r\n\theight: 30,\r\n\ttext: 'Row index:',\r\n\t\r\n});\r\n\r\n\r\nvar tf1= Ti.UI.createTextField({\r\n\twidth: 50,\r\n\theight: 30,\r\n\ttop:115,\r\n\tbackgroundColor:'white',\r\n\tleft: 178,\r\n\tvalue: '1'\r\n});\r\n\r\nvar closeButton = Ti.UI.createButton({\r\n\ttitle:'Close Window',\r\n\theight:50,\r\n\twidth:140,\r\n\tfontSize: 16,\r\n\ttop:60,\r\n\tleft:160\r\n});\r\n\r\ncloseButton.addEventListener('click', function(){\r\n\tTitanium.UI.currentWindow.close();\r\n});\r\n\r\n\r\n\r\nwin.add(closeButton);\r\nwin.add(tableView);\r\nwin.add(selRow);\r\nwin.add(deselRow);\r\nwin.add(deselAll);\r\nwin.add(tf1);\r\nwin.add(label1);\r\n\r\n\r\n\r\n\r\nselRow.addEventListener('click', function(){\r\n\ttableView.selectRow(parseInt(tf1.value)-1);\r\n});\r\n\r\ndeselRow.addEventListener('click', function(){\r\n\ttableView.deselectRow(parseInt(tf1.value)-1);\r\n});\r\n\r\ndeselAll.addEventListener('click', function(){\r\n\tfor (i=0; i<5;i++){\r\n\t\ttableView.deselectRow(i);\r\n\t}\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Method selectRow in tableView does not deselect previously selected row", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "410467", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T20:44:24.000+0000", "updated": "2017-03-09T20:44:24.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }