{ "id": "155071", "key": "AC-643", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "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-03-07T20:16:34.000+0000", "created": "2016-02-23T14:23:52.000+0000", "labels": [ "gesture", "ios", "shake" ], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-07T20:16:34.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Shake gesture return object doesn't contain e.x and e.y, and e.timestamp is always 0 (also after second shake).\r\n\r\nMy code (index controller):\r\n\r\nTi.Gesture.addEventListener('shake',function(e) {\r\n\tconsole.info(e);\r\n});\r\n\r\nOutput (with every shake):\r\n\r\n[INFO] : {\r\n[INFO] : bubbles = 1;\r\n[INFO] : cancelBubble = 0;\r\n[INFO] : source = \"[object GestureModule]\";\r\n[INFO] : timestamp = 0;\r\n[INFO] : type = shake;\r\n[INFO] : }\r\n\r\n", "attachment": [], "flagged": false, "summary": "Shake gesture timestamp always 0, x/y undefined", "creator": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "arif", "key": "arif", "displayName": "Arjan", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "Mac OSX 10.11.3 (El Capitan)\r\nAppcelerator Studio 4.5.0.201602170821\r\nTitanium SDK 5.2.0GA / 5.1.2.GA\r\nPlatform iOS", "comment": { "comments": [ { "id": "378612", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, I tested the issue with SDK 5.2.0.GA in Android 4.4.2(Explorer ZV). Ti. Gesture seems to be working as expected. Below is the console log. \r\n\r\n{code}\r\n[INFO] : {\"type\":\"shake\",\"source\":{\"bubbleParent\":true,\"portrait\":true,\"landscape\":false,\"orientation\":1,\"apiName\":\"Ti.Gesture\",\"_events\":{\"shake\":{}}},\"timestamp\":1457029037966,\"z\":6.129000186920166,\"y\":0.3059999942779541,\"x\":5.36299991607666,\"bubbles\":false,\"cancelBubble\":false}\r\n[INFO] : {\"type\":\"shake\",\"source\":{\"bubbleParent\":true,\"portrait\":true,\"landscape\":false,\"orientation\":1,\"apiName\":\"Ti.Gesture\",\"_events\":{\"shake\":{}}},\"timestamp\":1457029048120,\"z\":8.734000205993652,\"y\":4.442999839782715,\"x\":3.5239999294281006,\"bubbles\":false,\"cancelBubble\":false}\r\n[INFO] : {\"type\":\"shake\",\"source\":{\"bubbleParent\":true,\"portrait\":true,\"landscape\":false,\"orientation\":1,\"apiName\":\"Ti.Gesture\",\"_events\":{\"shake\":{}}},\"timestamp\":1457029053519,\"z\":9.194000244140625,\"y\":3.2170000076293945,\"x\":-0.45899999141693115,\"bubbles\":false,\"cancelBubble\":false}\r\n{code}\r\n\r\nh5. Sample Code Segment\r\nindex.js\r\n{code}\r\nfunction doClick(e) {\r\n Titanium.API.info(\"You clicked the button\");\r\n};\r\n$.win.open();\r\nTi.Gesture.addEventListener('shake', function(e) {\r\n console.info(e);\r\n}); \r\n{code}\r\nindex.xml\r\n{code}\r\n\r\n \r\n \r\n