{ "id": "92599", "key": "TIMOB-9376", "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": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2016-10-19T15:45:08.000+0000", "created": "2012-05-31T06:23:53.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "community", "defect", "ios", "parity", "titanbeta" ], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-23T19:02:27.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4.Problem\r\nThe 'click' event of a view fires when the view is touched, even before the finger (or mouse) is released.\r\n\r\nA true 'click' does not (should not) exist until the component receives a mouse-down followed by a mouse-up without the mouse moving in between. The iOS implementation is not adhering to this definition.\r\n\r\nh4.Expected behavior\r\nWhen you touch and hold your finger (or mouse) down on a view, only the touchstart, longpress, and longclick (Android only) events should fire. The click event should not fire until the finger (or mouse) is lifted, and then only if the finger (or mouse) has not moved since the touch started.\r\n\r\nh4.Actual behavior\r\nWhen you touch and hold your finger (or mouse) down on a view on the iPhone simulator, the click event fires.\r\n\r\nWorks on Android correctly.\r\nBroken on iOS.\r\n\r\nTherefore, this is also a parity issue.\r\n\r\nh4.Testcase\r\napp.js:\r\n{code}\r\nwin1=Ti.UI.createWindow({havbarHidden:false,\r\n layout:'vertical',\r\n backgroundColor:'gray'});\r\nvw1=Ti.UI.createView({height:80,\r\n left:30,\r\n right:30,\r\n backgroundColor:'blue'\r\n });\r\nwin1.add(vw1);\r\nlbl1=Ti.UI.createLabel({text:'Press and hold the blue box above',\r\n color:'white'});\r\nwin1.add(lbl1);\r\n\r\nfunction DoClick()\r\n{\r\n alert('View got clicked');\r\n}\r\nvw1.addEventListener('click',DoClick);\r\nwin1.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: 'click' event fires on a view upon finger-down instead of finger-up", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "- Titanium SDK 2.1.0.v20120523205530 (and all the way back to 1.8.2 at least)\r\n- Titanium Studio 1.0.9.201202141208\r\n- iOS 5.0 (simulator)\r\n- Mac OSX 10.7.2\r\n\r\n", "comment": { "comments": [ { "id": "241814", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Duplicated by TIMOB-11866, but note that there is a side effect of the fix to TIMOB-11866: if a slow click is performed (where the click lasts longer than half a second), the click event doesn't fire at all. I think the click even should fire in this case unless there is a longpress event assigned to the same view.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2013-03-12T19:08:54.000+0000", "updated": "2013-03-12T19:08:54.000+0000" }, { "id": "399377", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Cannot reproduce with 5.5.1.GA and iOS 10 anymore. Demo:\r\n\r\n{code:javascript}\r\nvar win1 = Ti.UI.createWindow({\r\n havbarHidden: false,\r\n layout: 'vertical',\r\n backgroundColor: 'gray'\r\n});\r\n\r\nvar vw1 = Ti.UI.createView({\r\n height: 80,\r\n left: 30,\r\n right: 30,\r\n backgroundColor: 'blue'\r\n});\r\n\r\nvar lbl1 = Ti.UI.createLabel({\r\n text: 'Press and hold the blue box above',\r\n color: 'white'\r\n});\r\n\r\nwin1.add(vw1);\r\nwin1.add(lbl1);\r\n\r\nvw1.addEventListener('click', function() {\r\n alert('View got clicked');\r\n});\r\n\r\nwin1.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-19T15:45:08.000+0000", "updated": "2016-10-19T15:45:08.000+0000" }, { "id": "415343", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-23T19:02:27.000+0000", "updated": "2017-03-23T19:02:27.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }