{ "id": "96203", "key": "TIMOB-10030", "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": "15107", "description": "2013 Sprint 09", "name": "2013 Sprint 09", "archived": true, "released": true, "releaseDate": "2013-05-06" } ], "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": "2013-04-25T10:20:09.000+0000", "created": "2012-07-15T05:20:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "community" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-17T18:46: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2. The problem\r\n\r\n\r\n\"click\" event produces wrong \"x\" and \"y\" coordinates.\r\n\r\n\r\nh2. Steps to reproduce\r\n\r\n\r\nTo see the issue, run this example: \r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#000',\r\n navBarHidden: true\r\n});\r\n\r\nvar wrapper = Ti.UI.createView({\r\n\theight: 20,\r\n\tbackgroundColor: '#f00',\r\n\twidth: 200\r\n});\r\n\r\nvar left = Ti.UI.createView({\r\n\theight: 10,\r\n\twidth: 200,\r\n\tleft: 0,\r\n\tbackgroundColor: '#093',\r\n\twidth: 0\r\n});\r\n\r\nvar right = Ti.UI.createView({\r\n\theight: 10,\r\n\twidth: 0,\r\n\tright: 0,\r\n\tbackgroundColor: '#039',\r\n\twidth: 200\r\n});\r\n\r\nwrapper.add(left);\r\nwrapper.add(right);\r\nwin.add(wrapper);\r\n\r\nwrapper.addEventListener('click', function(e) {\r\n\tvar x = e.x.toFixed(2);\r\n\tTi.API.info('x: ' + x);\r\n\tleft.width = x;\r\n\tright.width = 200 - x;\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\n\r\nClick on red view from left to right.\r\n\r\n\r\nFirst few clicks work fine, but after the values are wrong. That can be seen in the console output, but also visually (by width of two inner views).\r\n\r\n\r\nThe issue exists on Android and on iOS.", "attachment": [], "flagged": false, "summary": "TiAPI: \"click\" event produces wrong coordinates", "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": "* Titanium SDK version: 2.2.0 (07/13/12 21:01 d1533aa)\r\n* Android x86 emulator (v8), iOS 5.1 simulator\r\n* OSX Lion", "comment": { "comments": [ { "id": "208632", "author": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I have some more info regarding this issue. It seems that issue is not present when there is only one view inside \"wrapper\" (and that is, \"left\" view) and the issue is caused by \"right\" view.\r\n\r\n\r\nThe workaround is to set \"touchEnabled\" to \"false\" to \"right\" view. I guess that \"right\" view somehow captures \"click\" and sends wrong coordinates to its parent view. Also, that works very strangely because numbers returned are alternating between two values when user clicks at same point.", "updateAuthor": { "name": "ivan.skugor", "key": "ivan.skugor", "displayName": "Ivan Skugor", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2012-07-20T00:38:44.000+0000", "updated": "2012-07-20T00:38:44.000+0000" }, { "id": "249013", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "cannot reproduce\r\n\r\nTested with\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0\r\nAndroid Emulator: Android SDK version: 2.2 ", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-25T10:20:09.000+0000", "updated": "2013-04-25T10:20:09.000+0000" }, { "id": "413598", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-17T18:46:40.000+0000", "updated": "2017-03-17T18:46:40.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }