{ "id": "174342", "key": "TIMOB-27530", "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": "20949", "name": "Release 9.0.1", "archived": false, "released": true, "releaseDate": "2020-04-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2020-03-12T02:03:01.000+0000", "created": "2019-11-06T16:21:27.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "engSchedule" ], "versions": [ { "id": "20827", "name": "Release 8.2.0", "archived": false, "released": true, "releaseDate": "2019-09-19" }, { "id": "20832", "name": "Release 8.3.0", "archived": false, "released": true, "releaseDate": "2019-11-25" } ], "issuelinks": [ { "id": "58398", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "175085", "key": "TIMOB-27940", "fields": { "summary": "Ti.UI.ScrollView Test Suite: Titanium.UI.ScrollView Acceptance TIMOB-27530", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "10100", "description": "This Issue Type is used to create Zephyr Test within Jira.", "name": "Test", "subtask": false } } } }, { "id": "57902", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "158231", "key": "TIMOB-22281", "fields": { "summary": "Ti.UI.ScrollView Test Suite: Titanium.UI.ScrollView Acceptance TIMOB-9206", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "10100", "description": "This Issue Type is used to create Zephyr Test within Jira.", "name": "Test", "subtask": false } } } }, { "id": "57901", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "92217", "key": "TIMOB-9206", "fields": { "summary": "Android: Scroll View Touch Listeners Prevent Scrolling", "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": "58263", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174810", "key": "TIMOB-27807", "fields": { "summary": "Android: convertPointToView() returns pixels instead of default units", "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": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "updated": "2020-06-05T10:28:32.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": "Application UI glitches out when trying to drag a label horizontally. \r\n\r\n*Test case:*\r\n{code:java}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\nvar scroll = Ti.UI.createScrollView({\r\n scrollType: 'vertical',\r\n contentHeight: 3010,\r\n text: 'Scroll View'\r\n});\r\nvar width = 150, height = 90;\r\nfor (var i = 0; i < 30; i++) {\r\n scroll.add(Ti.UI.createLabel({\r\n draggable: true,\r\n text: 'Drag Me Horizontally ' + (i + 1), textAlign: 'center',\r\n color: '#000',\r\n top: i * 100 + 10,\r\n width: width, height: height,\r\n backgroundColor: '#eee'\r\n }));\r\n}\r\nscroll.addEventListener('touchstart', doDrag);\r\nscroll.addEventListener('touchmove', doDrag);\r\nscroll.addEventListener('touchcancel', doDrag);\r\nscroll.addEventListener('touchend', doDrag);\r\nfunction doDrag(evt) {\r\n Ti.API.info('Event Fired On: ' + evt.source.text);\r\n if (evt.source.draggable) {\r\n var global = evt.source.convertPointToView({ x: evt.x, y: evt.y }, scroll);\r\n evt.source.applyProperties({\r\n left: global.x - width / 2\r\n });\r\n }\r\n}\r\nwin.add(scroll);\r\nwin.open();\r\n{code}\r\n\r\n*Test Steps*\r\n# Create a Titanium application\r\n# Add the code above in to the ((app.js}}\r\n# Run on Android\r\n# Try to drag a label horizontally\r\n\r\n*Actual result*\r\nWhole application moves and UI glitches out\r\n\r\n*Expected result*\r\nOnly label should move horizontally", "attachment": [], "flagged": false, "summary": "Android: UI glitches out when using 'applyProperties' with Scroll View Touch Listeners", "creator": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "MacOS Catalina 10.15.1 Beta\r\nXcode 11\r\nNode.js 10.16.3\r\niPhone 6 Sim(12.4)\r\nGoogle Pixel 7.1.1\r\n\r\n{\"NPM\":\"4.2.15-1\",\"CLI\":\"7.1.1\"}\r\nSDK 8.3.0.v20191030085531\r\nSDK 8.2.1.GA", "closedSprints": [ { "id": 1181, "state": "closed", "name": "2020 Sprint 5", "startDate": "2020-03-02T18:45:02.513Z", "endDate": "2020-03-13T18:45:00.000Z", "completeDate": "2020-03-13T16:42:04.632Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "452611", "author": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/11327", "updateAuthor": { "name": "ybanev", "key": "ybanev", "displayName": "Yordan Banev", "active": true, "timeZone": "Europe/Athens" }, "created": "2019-11-12T15:48:56.000+0000", "updated": "2019-11-12T15:48:56.000+0000" }, { "id": "453180", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nPR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-12-13T18:17:03.000+0000", "updated": "2019-12-13T18:17:03.000+0000" }, { "id": "453497", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket*, fix verified in SDK version {{9.0.0.v20200103081513}}. \r\n\r\nTest and other information can be found at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/11327", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-01-08T11:17:13.000+0000", "updated": "2020-01-08T11:17:13.000+0000" }, { "id": "454664", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening ticket as label flys of the screen when tapping on a label. \r\n\r\n*Test Environment*\r\n{code:java}\r\nMacOS Catalina: 10.15.1 beta\r\nXcode: 11.3\r\nJava Version: 1.8.0_131\r\nAndroid NDK: 18.1.5063045\r\nNode.js: 10.16.3\r\n\"NPM\":\"5.0.0-1\",\"CLI\":\"8.0.0-master.10\"\r\nPixel xl (7.1.1) Emulator\r\nSDK Version: 9.0.0.v20200207114311\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-11T17:06:27.000+0000", "updated": "2020-03-11T17:06:27.000+0000" }, { "id": "454671", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~smohammed],\r\n\r\nFirst, I would say this ticket's sample code is written wrong. The touch listeners are set up on the {{ScrollView}}, not the {{Label}} views. The issue is the {{doDrag()}} function is moving the ScrollView instead of the labels. And the event bubbling feature walks up the parent hierarchy, not the children. I can see that this code does what you expect on iOS, but I would argue that iOS is the one that's doing it wrong.\r\n\r\nSecond, there is a separate bug here. The problem is the point returned by the {{convertPointToView()}} method is wrong. It looks like it's returning the result in pixels instead of dips (aka: dp). I wrote this up as a separate ticket [TIMOB-27807].", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-12T00:15:35.000+0000", "updated": "2020-03-12T01:55:40.000+0000" }, { "id": "454672", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The below code works on both Android and iOS. I've implemented a work-around on Android where it takes the returned {{convertPointToView()}} coordinates and converts them from pixels to dp. Android also has a nasty habit of sliding the view just to the left of your finger. We can look into that when addressing [TIMOB-27807] in the future.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: '#fff'\r\n});\r\nvar scroll = Ti.UI.createScrollView({\r\n\tscrollType: 'vertical',\r\n\tcontentHeight: 3010,\r\n\ttext: 'Scroll View'\r\n});\r\nvar width = 150, height = 90;\r\nfor (var i = 0; i < 30; i++) {\r\n\tvar label = Ti.UI.createLabel({\r\n\t\tdraggable: true,\r\n\t\ttext: 'Drag Me Horizontally ' + (i + 1), textAlign: 'center',\r\n\t\tcolor: '#000',\r\n\t\ttop: i * 100 + 10,\r\n\t\twidth: width,\r\n\t\theight: height,\r\n\t\tbackgroundColor: '#eee'\r\n\t});\r\n\tlabel.addEventListener('touchstart', doDrag);\r\n\tlabel.addEventListener('touchmove', doDrag);\r\n\tlabel.addEventListener('touchcancel', doDrag);\r\n\tlabel.addEventListener('touchend', doDrag);\r\n\tscroll.add(label);\r\n}\r\nfunction doDrag(evt) {\r\n\tTi.API.info('Event Fired On: ' + evt.source.text);\r\n\tif (evt.source.draggable) {\r\n\t\tvar point = evt.source.convertPointToView({ x: evt.x, y: evt.y }, scroll);\r\n\t\tif (Ti.Android) {\r\n\t\t\tpoint.x = Ti.UI.convertUnits(point.x + 'px', 'dip');\r\n\t\t\tpoint.y = Ti.UI.convertUnits(point.y + 'px', 'dip');\r\n\t\t}\r\n\t\tevt.source.left = undefined;\r\n\t\tevt.source.center = { x: point.x };\r\n\r\n\t\tswitch (evt.type) {\r\n\t\t\tcase 'touchstart':\r\n\t\t\t\tscroll.scrollingEnabled = false;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'touchcancel':\r\n\t\t\tcase 'touchend':\r\n\t\t\t\tscroll.scrollingEnabled = true;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tevt.cancelBubble = true;\r\n\t}\r\n}\r\nwin.add(scroll);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-03-12T02:02:22.000+0000", "updated": "2020-03-12T02:02:22.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }