{ "id": "91095", "key": "TIMOB-8929", "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": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13397", "description": "Sprint 2012-09 Mobile Web", "name": "Sprint 2012-09 MW", "archived": true, "released": true, "releaseDate": "2012-05-06" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-01T15:51:32.000+0000", "created": "2012-04-30T16:11:10.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-port" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "32988", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "121649", "key": "TIMOB-15633", "fields": { "summary": "Android: Animate is canceling the view transform ", "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 } } } }, { "id": "16958", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "91099", "key": "TIMOB-8930", "fields": { "summary": "MobileWeb: Ti.UI.View.rect not updated after animation", "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": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-01T09:21:40.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": "For some reason, the View.rect.y value is returning a large value, no matter where the view is position.\r\n\r\nOn further investigation, it appears that the x and y values are being switched. Also, the values are not updated when the view is animated. Consider the following example:\r\n\r\n{code}\r\nvar win1 = Titanium.UI.createWindow({ \r\n title:'Window',\r\n backgroundColor:'#fff'\r\n});\r\n\r\nvar label1 = Titanium.UI.createLabel({\r\n\tcolor:'#999',\r\n\ttext:'Click Me',\r\n\ttop: 10,\r\n\tfont:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n\ttextAlign:'center',\r\n\twidth:'auto',\r\n\ttouchEnabled: true\r\n});\r\n\r\nlabel1.addEventListener('click', function(e) {\r\n\tTi.API.info(\"Label pos is: \" +label1.rect.x + \",\"+label1.rect.y);\r\n\tif (label1.rect.y < 100) {\r\n\t\tlabel1.animate({ top: 100, duration: 500 });\r\n\t} else {\r\n\t\tlabel1.animate({ top: 10, duration: 500 });\r\n\t}\r\n});\r\n\r\nwin1.add(label1);\r\n\r\nwin1.open();\r\n{code}\r\n\r\nOn iOS and Android, this behaves as expected--the label moves up when clicked the first time, then down when clicked the second time.\r\n\r\nOn Mobile Web, the label moves up after the first click, but then stays fixed. The console logging shows why: \r\n\r\n{code}\r\nindex.html:10460[INFO] Label pos is: 10,446\r\nindex.html:10460[INFO] Label pos is: 10,446\r\n{code}\r\n\r\nSince the view is pinned to the top and centered horizontally, it should be at 446,10. \r\n\r\nAlso note that the reported value doesn't change before and after animation. (Update: Filed this as a separate issue, TIMOB-8930.)\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "MobileWeb: View.rect x and y values appear to be switched", "creator": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "aevans", "key": "aevans", "displayName": "Arthur Evans", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "193233", "author": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Pull request: https://github.com/appcelerator/titanium_mobile/pull/2108", "updateAuthor": { "name": "bhughes", "key": "bhughes", "displayName": "Bryan Hughes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-04-30T17:12:57.000+0000", "updated": "2012-04-30T17:12:57.000+0000" }, { "id": "216649", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fix on:\r\nTitanium studio : 2.1.1.201207271312\r\nSDK version : 2.2.0.v20120827143312\r\nChrome 21.0.xx\r\nFirefox 15\r\nSafari 6.0\r\nAndroid 4.0.4 default browser,chrome 18.0.xx ,firefox 15.0\r\nIphone 5.0.1 mobile safari", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-08-28T17:05:25.000+0000", "updated": "2012-08-28T17:05:25.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }