{ "id": "123270", "key": "AC-2029", "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": "2014-01-01T23:15:38.000+0000", "created": "2013-12-05T10:02:34.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:58.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": [], "description": "h3. Steps to Reproduce\r\nI try with Alloy : \r\n-Do a window\r\n-In TSS put orientationModes = [\r\n Titanium.UI.PORTRAIT,\r\n Titanium.UI.UPSIDE_PORTRAIT,\r\n Titanium.UI.LANDSCAPE_LEFT,\r\n Titanium.UI.LANDSCAPE_RIGHT\r\n];\r\n\r\nAdd a Gesture eventListener to know the orientation.\r\n\r\nCheck the event of 'orientationchange' and see that faceup and down event are lunch even if we forbid those orientation in TSS.\r\n\r\nWe can create some workaround but it will be good if you can fix that :)\r\nRegards\r\n\r\n\r\nh3. Actual Result\r\nFace up and Down event are launched\r\n\r\nh3. Expected Result\r\nFace up and Down event don't be launched because we force the orienation with orientationModes = [\r\n Titanium.UI.PORTRAIT,\r\n Titanium.UI.UPSIDE_PORTRAIT,\r\n Titanium.UI.LANDSCAPE_LEFT,\r\n Titanium.UI.LANDSCAPE_RIGHT\r\n];\r\n", "attachment": [ { "id": "44400", "filename": ".log", "author": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-05T10:03:37.000+0000", "size": 5315425, "mimeType": "application/octet-stream; charset=ISO-8859-1" }, { "id": "44401", "filename": "diagnostic855115633028829762.log", "author": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-05T10:03:42.000+0000", "size": 10394, "mimeType": "application/octet-stream; charset=ISO-8859-1" } ], "flagged": false, "summary": "Windows Orientation Mode Faceup/down", "creator": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "baharroth", "key": "baharroth", "displayName": "Baharroth", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio 3.1.3", "comment": { "comments": [ { "id": "282779", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hello Baharroth,\n\nI will need some clarification on your issue.\nThe orientationModes property should be set in your JS with your window code, not in your TSS.\nAlso, the orientationchange event fires when the device orientation changes, not necessarily the window.\n\nIf you are trying to prevent your app from being able to change to certain orientations, please take a look at this page: https://wiki.appcelerator.org/display/guides/Orientation#Orientation-Lockingapporientation\nThese directions change a little depending on your device type. What devices are you trying this on?\nCould you please provide some sample code or your project so that I can reproduce the issue you are seeing?\n\nAdditionally, here are some other helpful docs that explain the functions and events you reference:\nhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-orientationModes\nhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Gesture-event-orientationchange", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-06T01:23:10.000+0000", "updated": "2013-12-06T01:23:10.000+0000" }, { "id": "286347", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "I tested this issue with the test code below. I can't reproduce this issue in latest Ti SDK (3.2.0.GA) and Alloy 1.3.0. Please check my test code and let me know if have any problem. If you are able to reproduce it using a different test case, please post it here. We will revisit it then. \r\n\r\nh5. Test Environment:\r\n\r\nMAC OS X 10.8.5,\r\nTitanium SDK 3.2.0 GA\r\nAlloy 1.3.0,\r\nTi CLI 3.2.0\r\n\r\nh5. Test Code\r\n\r\nindex.js\r\n{code}\r\n$.index.open();\r\nTi.Gesture.addEventListener('orientationchange', function(e) {\r\n\r\n\talert(getOrientation(e.orientation));\r\n\r\n});\r\n\r\nfunction getOrientation(o) {\r\n\tswitch (o) {\r\n\t\tcase Titanium.UI.PORTRAIT:\r\n\t\t\treturn 'portrait';\r\n\t\tcase Titanium.UI.UPSIDE_PORTRAIT:\r\n\t\t\treturn 'upside portrait';\r\n\t\tcase Titanium.UI.LANDSCAPE_LEFT:\r\n\t\t\treturn 'landscape left';\r\n\t\tcase Titanium.UI.LANDSCAPE_RIGHT:\r\n\t\t\treturn 'landscape right';\r\n\t\tcase Titanium.UI.FACE_UP:\r\n\t\t\treturn 'face up';\r\n\t\tcase Titanium.UI.FACE_DOWN:\r\n\t\t\treturn 'face down';\r\n\t\tcase Titanium.UI.UNKNOWN:\r\n\t\t\treturn 'unknown';\r\n\t}\r\n}\r\n\r\nalert(getOrientation($.index.orientation));\r\n\r\n{code}\r\nindex.xml\r\n{code}\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n{code}\r\nindex.tss\r\n{code}\r\n\"Window\": {\r\nbackgroundColor:\"white\",\r\norientationModes :[\r\nTitanium.UI.PORTRAIT,\r\nTitanium.UI.UPSIDE_PORTRAIT,\r\nTitanium.UI.LANDSCAPE_LEFT,\r\nTitanium.UI.LANDSCAPE_RIGHT\r\n]\r\n} \r\n{code}\r\n\r\nThanks\r\n", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-31T08:04:00.000+0000", "updated": "2013-12-31T22:12:13.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }