{ "id": "105497", "key": "TIMOB-12636", "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": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2017-06-26T22:14:06.000+0000", "created": "2012-11-26T13:47:11.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-04-04T23:20:16.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": "Consider the following Titanium code:\r\n\r\n{code:JavaScript}\r\n\tvar view = Ti.UI.createView({\r\n\t\theight : 200,\r\n\t\twidth : 200,\r\n\t\tbackgroundColor : 'yellow'\r\n\t});\r\n\r\n\tvar viewChild = Ti.UI.createView({\r\n\t\tbackgroundColor : 'red',\r\n\t\tcenter : {\r\n\t\t\tx : 100\r\n\t\t},\r\n\t\tright : 50\r\n\t});\r\n\r\n\tview.add(viewChild);\r\n\r\n\tvar win = Ti.UI.createWindow();\r\n\twin.add(view);\r\n\r\n\twin.open();\r\n\r\n\tview.addEventListener('postlayout', function() {\r\n\t\tTi.API.info(\" POST_LAYOUT: the width of view should be 200: \" + view.size.width);\r\n\t\tTi.API.info(\" POST_LAYOUT: the width of viewChild should be 100: \" + viewChild.size.width);\r\n\t});\r\n\r\n\tTi.API.info(\" Expected: the width of view should be 200: \" + view.size.width);\r\n\tTi.API.info(\" Expected: the width of viewChild should be 100: \" + viewChild.size.width); \r\n\r\n\t//Simulator iOS 6 output\r\n\t//[INFO] : \b\b \bExpected: the width of view should be 200: 200\r\n\t//[INFO] : \b\b \bExpected: the width of viewChild should be 100: 100\r\n{code}\r\n\r\nh6.Expected\r\nthe width of viewChild should be 100. (The width should be calculated as: ((viewChild.center(100) - viewChild.right(50)) * 2), according to \"http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.View-property-layout\")\r\n\r\nh6.Actual\r\nThe width of viewChild is 150\r\n\r\nh6.tested on\r\nFireFox 18.0.2\r\n{code}\r\n[INFO] POST_LAYOUT: the width of view should be 200: 200\r\n\r\nindex.html (line 2024)\r\ninfo:\r\n\r\n[INFO] POST_LAYOUT: the width of viewChild should be 100: 150\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Incorrect Ti.UI.View width calculation", "creator": { "name": "ypidstryhach_gl", "key": "ypidstryhach_gl", "displayName": "Yaroslav Pidstryhach", "active": true, "timeZone": "Europe/Helsinki" }, "subtasks": [], "reporter": { "name": "ypidstryhach_gl", "key": "ypidstryhach_gl", "displayName": "Yaroslav Pidstryhach", "active": true, "timeZone": "Europe/Helsinki" }, "environment": "MS Windows, Titanium Studio 3.0.0.201211202053\r\nMac OS X 10.7.5\r\nTitanium SDK 3.0.0 & 3.1 CI\r\nChrome simulator or a Webkit mobile browser, FireFox", "comment": { "comments": [ { "id": "422872", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Resolving as \"Won't Fix\" as MobileWeb has been deprecated.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-26T22:14:06.000+0000", "updated": "2017-06-26T22:14:06.000+0000" }, { "id": "436307", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing as will not fix.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-04T23:20:16.000+0000", "updated": "2018-04-04T23:20:16.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }