{ "id": "127958", "key": "TIMOB-16705", "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": null, "resolutiondate": null, "created": "2014-03-21T17:16:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "reprod" ], "versions": [ { "id": "15857", "description": "Release 3.2.2", "name": "Release 3.2.2", "archived": false, "released": true, "releaseDate": "2014-03-09" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:01.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "There is a problem with \"orientationchange\", in some cases event is fired when orientation is not changed. To see that run this example code:\r\n\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#333'\r\n});\r\n\r\nvar sidebar = Ti.UI.createView({\r\n\tright: 0,\r\n\twidth: 100,\r\n\tbackgroundColor: '#fff',\r\n\tvisible: false\r\n});\r\n\r\nTi.Gesture.addEventListener('orientationchange',function(e) {\r\n\t// get current device orientation from\r\n\t// Ti.Gesture.orientation\r\n\tTi.API.info('Ti.Gesture.orientation');\r\n\tTi.API.info(Ti.Gesture.orientation);\r\n\t// get orientation from event object\r\n\t// from e.orientation\r\n\tTi.API.info('e.orientation');\r\n\tTi.API.info(e.orientation);\r\n\t// Ti.Gesture.orientation should match e.orientation\r\n\t// but iOS and Android will report different values\r\n\t\r\n\tTi.API.info('Ti.UI.orientation');\r\n\tTi.API.info(Ti.UI.orientation);\r\n\r\n\t// two helper methods return a Boolean\r\n\t// e.source.isPortrait()\r\n\t// e.source.isLandscape()\r\n\tTi.API.info('e.source');\r\n\tTi.API.info(e.source.isPortrait());\r\n\tTi.API.info(e.source.isLandscape());\r\n\r\n\tif (e.source.isPortrait()) {\r\n\t\tsidebar.visible = false;\r\n\t}\r\n\telse {\r\n\t\tsidebar.visible = true;\r\n\t}\r\n});\r\n\r\nwin.add(sidebar);\r\n\r\nwin.open();\r\n{code}\r\n\r\nYou must test it on device. Hold device in hand (in vertical position) and then try to put it on the table :) (so, it goes from 90 degrees in hand to 0 degrees on table). You should be able to see white sidebar on right side - which means event is fired and orientation is wrongly set in event listener argument.\r\n\r\n\r\nMy tests have found that \"Ti.UI.orientation\" works correctly but it's deprecated since 1.7.2 SDK.", "attachment": [], "flagged": false, "summary": "iOS: Orientation problem when slightly tilting forward/backward", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "* Ti SDK 3.2.2.GA\r\n* iOS 7.1\r\n* Ti CLI 3.2.1\r\n* OSX 10.9.2", "comment": { "comments": [ { "id": "298746", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce the issue with the provided test case.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-26T04:40:25.000+0000", "updated": "2014-03-26T04:40:25.000+0000" }, { "id": "324647", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduce 3.2.2 and 3.4.0\r\nAppcelerator Studio, build: 3.3.0.201407111535\r\nTiSDK 3.4.0\r\n iOS SDK: 7.1\r\nTitanium Command-Line Interface, CLI version 3.3.0", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-19T05:11:49.000+0000", "updated": "2014-09-19T05:11:49.000+0000" }, { "id": "420455", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I have been able to reproduce this issue with the following environment; \r\niPhone 7 (10.2) \r\nMacOS 10.11.6 (15G31) \r\nStudio 4.9.0.201705021158 \r\nTi SDK 6.1.0.v20170519131839 \r\nAppc NPM 4.2.9 \r\nAppc CLI 6.2.1 \r\nTi CLI 5.0.13 \r\nAlloy 1.9.11 \r\nArrow 2.0.0 \r\nXcode 8.2 (8C38) \r\nNode v4.8.2 \r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-05-25T18:20:42.000+0000", "updated": "2017-05-25T18:20:42.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }