{ "id": "85057", "key": "TIMOB-7266", "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": "2017-06-22T22:47:51.000+0000", "created": "2012-01-17T14:58:22.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "14601", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "79446", "key": "TIMOB-5303", "fields": { "summary": "Android: UI view size property values incorrect", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-22T22:47:51.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": "h2. Problem\r\n\r\nThe view's size property values are incorrect (they remain the previous values) when they are used/queried immediately after they have been modified.\r\n\r\nh2. Test case\r\n\r\nIn the example below, the width property is changed within a {{orientationchange}} event listener. When the device is reorientated, the logged value is the previous rather than new value.\r\n\r\n{code:lang=javascript|title=app.js}\r\n var win = Ti.UI.createWindow({\r\n// fullscreen: false, // once fixed, please check with this line uncommented\r\nbackgroundColor:'red'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n backgroundColor:'blue',\r\n width:'50',\r\n height:50\r\n});\r\n\r\nwin.add(view);\r\n\r\nTi.API.info(\"*** Before window open - view.size.width = 50 ***\");\r\nTi.API.info(\"view.size w x h: \" + view.size.width + \" x \" + view.size.height); // correct\r\n\r\nview.width = 100;\r\n\r\nwin.addEventListener('open', function(){\r\n Ti.API.info(\"*** Window open - view.size.width = 100 ***\");\r\n Ti.API.info(\"view.size w x h: \" + view.size.width + \" x \" + view.size.height); // correct\r\n});\r\n\r\n\r\nTi.Gesture.addEventListener('orientationchange', function(){\r\n Ti.API.info(\"*** orientationchange - view.size.width = 200 ***\");\r\n view.width = 200;\r\n Ti.API.info(\"view.size w x h: \" + view.size.width + \" x \" + view.size.height); // incorrect on first orientation change\r\n});\r\nwin.open();\r\n{code}\r\n\r\nh2. Logs\r\n\r\n{code:lang=none}\r\n[INFO] One moment, building ...\r\n[INFO] Detected third-party module: com.testing.module1/1\r\n[INFO] Detected third-party module: com.testing.module1/1\r\n[INFO] Titanium SDK version: 1.8.0.1 (12/22/11 13:09 fbdc96f)\r\n[INFO] iPhone Device family: universal\r\n[INFO] iPhone SDK version: 5.0\r\n[INFO] iPhone simulated device: iphone\r\n[INFO] Launching application in Simulator\r\n[INFO] Launched application in Simulator (1.55 seconds)\r\n[INFO] Found 5.0 patch installed\r\n[INFO] Application started\r\n[INFO] testing11/1.0 (1.8.0.1.fbdc96f)\r\n[INFO] *** Before window open - view.size.width = 50 ***\r\n[INFO] view.size w x h: 50 x 50\r\n[INFO] *** Window open - view.size.width = 100 ***\r\n[INFO] view.size w x h: 100 x 50\r\n[INFO] *** orientationchange - view.size.width = 200 ***\r\n[INFO] view.size w x h: 100 x 50\r\n[INFO] *** orientationchange - view.size.width = 200 ***\r\n[INFO] view.size w x h: 200 x 50\r\n{code}\r\n\r\nh2. Workaround\r\n\r\nUsing setTimeout allows the size values to be updated to reflect the re-rendered view.\r\n", "attachment": [], "flagged": false, "summary": "iOS: UI view size property values incorrect if queried too soon after orientation change", "creator": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* Titanium Mobile 1.8.0.1 (12/22/11 13:09 fbdc96f) (official release)\r\n* iPhone simulated device: iphone, universal\r\n* iOS 5.0\r\n* simulator\r\n", "comment": { "comments": [ { "id": "245699", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-04T11:39:43.000+0000", "updated": "2013-04-04T11:39:43.000+0000" }, { "id": "422590", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am unable to reproduce this issue with the following environment;\r\niPhone 7 (10.2)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170620103414\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.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-22T22:47:51.000+0000", "updated": "2017-06-22T22:47:51.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }