{ "id": "76906", "key": "TIMOB-5662", "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-27T05:18:15.000+0000", "created": "2011-06-27T03:40:22.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mnegadaylov", "key": "mnegadaylov", "displayName": "Maxim Negadaylov", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T20:51: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": "Property 'orientation' of the event 'orientationchange' of the Ti.Gesture module returns 0. It should return different constants depend on the orientation of the device. \r\n{code:JavaScript}\r\nvar win = Ti.UI.currentWindow;\r\nwin.backgroundColor = '#EEE';\r\n\r\nvar label = Ti.UI.createLabel({\r\n\ttext: '1. Rotate your device 90 degrees.\\n 2. Shake your device',\r\n\tfontSize: 30,\r\n\ttop: 40,\r\n\tleft: 30\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:130,\r\n\tleft:90\r\n});\r\n\r\ncloseButton.addEventListener('click', function(){\r\n\tTi.Gesture.removeEventListener('orientationchange',orientation);\r\n\tTi.Gesture.removeEventListener('shake',shaking);\r\n\tTitanium.UI.currentWindow.close();\r\n});\r\n\r\nwin.add(closeButton);\r\nwin.add(label);\r\nfunction orientation(e){\r\n\talert('Your orientation is '+ e.orientation);\r\n};\r\n\r\nfunction shaking(){\r\n\talert('You are shaking your device!');\r\n};\r\nTi.Gesture.addEventListener('orientationchange',orientation);\r\nTi.Gesture.addEventListener('shake',shaking);\r\n\r\n{code} ", "attachment": [], "flagged": false, "summary": "MobileWeb: Property 'orientation' of the event 'orientationchange' of the Ti.Gesture module returns 0", "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": "410488", "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:51:21.000+0000", "updated": "2017-03-09T20:51:21.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }