{ "id": "66323", "key": "TIMOB-5513", "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-06T05:18:01.000+0000", "created": "2011-06-06T05:03:29.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:41:06.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": "in iPhone when clicking the Switch object the Javascript error occurs: Result of expression '_checkBox.touchstart' [undefined] is not a function. \r\n{code:JavaScript}\r\nvar win = Titanium.UI.currentWindow;\r\n\r\n//\r\n// BASIC SWITCH\r\n//\r\nvar basicSwitchLabel = Titanium.UI.createLabel({\r\n\ttext:'Basic Switch value = false' ,\r\n\tcolor:'#999',\r\n\tfont:{\r\n\t\tfontFamily: 'Helvetica Neue',\r\n\t\tfontSize: 15\r\n\t},\r\n\ttextAlign:'center',\r\n\ttop:10,\r\n\theight:'auto'\r\n});\r\n\r\nvar basicSwitch = Titanium.UI.createSwitch({\r\n\ttitle: \"Default title\",\r\n\tvalue:false,\r\n\ttop:30\r\n});\r\n\r\nbasicSwitch.addEventListener('change',function(e){\r\n\tbasicSwitchLabel.text = 'Basic Switch value = ' + e.value + ' act val ' + basicSwitch.value;\r\n});\r\n\r\n//\r\n// CHANGE SWITCH\r\n//\r\nvar changeButton = Titanium.UI.createButton({\r\n\ttitle:'Toggle Switch',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:90,\r\n\tfontSize:20\r\n});\r\nchangeButton.addEventListener('click', function() {\r\n\tbasicSwitch.value = !basicSwitch.value;\r\n});\r\n\r\n//\r\n// HIDE/SHOW SWITCH\r\n//\r\nvar hideShowButton = Titanium.UI.createButton({\r\n\ttitle:'Hide/Show Switch',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:140,\r\n\tfontSize:20\r\n});\r\n\r\nvar hidden = false;\r\nhideShowButton.addEventListener('click', function() {\r\n\thidden ? basicSwitch.show() : basicSwitch.hide();\r\n\thidden = !hidden;\r\n});\r\n\r\n//\r\n// CHANGE title\r\n//\r\nvar updateTitleButton = Titanium.UI.createButton({\r\n\ttitle:'Change title',\r\n\theight:40,\r\n\twidth:200,\r\n\ttop:190,\r\n\tfontSize:20\r\n});\r\n\r\nupdateTitleButton.addEventListener('click', function() {\r\n\tbasicSwitch.title = \"Switch title \" + Math.floor(Math.random() * 1000);\r\n});\r\n\r\n\r\nvar closeButton = Ti.UI.createButton({\r\n\ttitle:'Close',\r\n\theight:40,\r\n\ttop:240,\r\n\twidth:200,\r\n\tfontSize:20\r\n});\r\n\r\ncloseButton.addEventListener('click', function(){\r\n\tTi.UI.currentWindow.close();\r\n});\r\n\r\nwin.add(basicSwitchLabel);\r\nwin.add(basicSwitch);\r\nwin.add(changeButton);\r\nwin.add(hideShowButton);\r\nwin.add(updateTitleButton);\r\nwin.add(closeButton);\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Javascript error when clicking the switch object", "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": "410458", "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:41:06.000+0000", "updated": "2017-03-09T20:41:06.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }