{ "id": "171149", "key": "TIMOB-25792", "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": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-04-18T00:25:41.000+0000", "created": "2018-02-21T02:33:59.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "ScrollView", "android", "parity" ], "versions": [ { "id": "19906", "description": "", "name": "Release 6.3.0", "archived": false, "released": true, "releaseDate": "2017-11-01" } ], "issuelinks": [ { "id": "56329", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "170206", "key": "TIMOB-25474", "fields": { "summary": "Android: scrollview not scrolling when moving from SDK 5.5.1 to 6.3.0", "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": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56414", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "171397", "key": "AC-5673", "fields": { "summary": "Android: Nested ScrollViews are not working for Titanium SDK 6.3+", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-06-21T22:18: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Summary:*\r\nWhen scrolling a \"horizontal\" ScrollView within a \"vertical\" ScrollView, it will scroll horizontally until you scroll too far up/down, then horizontal scrolling will be canceled by the parent \"vertical\" ScrollView and it'll only scroll vertically from then on. This is a behavior change that was introduced in Titanium 6.3.0.\r\n\r\nThe old behavior would block the parent ScrollView from scrolling vertically while scrolling the child horizontal ScrollView. This behavior should be restored. _(This is also the iOS behavior.)_\r\n\r\n*Steps to Reproduce:*\r\n# Build/run the below code for Android using Titanium 6.3.0 or higher.\r\n# Start dragging one of the horizontal ScrollViews. (It's the box containing labels.)\r\n# As you drag it horizontally, drag up or down.\r\n# Notice the parent ScrollView will scroll vertically, but you can no longer scroll the child ScrollView horizontally anymore.\r\n\r\n{code:javascript}\r\nvar window = Ti.UI.createWindow({ fullscreen: true });\r\nvar verticalScrollView = Ti.UI.createScrollView(\r\n{\r\n\tlayout: \"vertical\",\r\n\tscrollType: \"vertical\",\r\n\tshowVerticalScrollIndicator: true,\r\n\tshowHorizontalScrollIndicator: false,\r\n\tbackgroundColor: \"darkgray\",\r\n\twidth: Ti.UI.FILL,\r\n\theight: Ti.UI.FILL,\r\n});\r\nfor (var scrollViewIndex = 1; scrollViewIndex <= 20; scrollViewIndex++) {\r\n\tverticalScrollView.add(Ti.UI.createLabel(\r\n\t{\r\n\t\ttext: \"Horizontal Scroll View \" + scrollViewIndex.toString(),\r\n\t\tcolor: \"white\",\r\n\t\ttop: \"10dp\",\r\n\t}));\r\n\tvar horizontalScrollView = Ti.UI.createScrollView(\r\n\t{\r\n\t\tlayout: \"horizontal\",\r\n\t\tscrollType: \"horizontal\",\r\n\t\tshowVerticalScrollIndicator: false,\r\n\t\tshowHorizontalScrollIndicator: true,\r\n\t\tbackgroundColor: \"darkgray\",\r\n\t\tborderWidth: \"1dp\",\r\n\t\tborderColor: \"black\",\r\n\t\twidth: \"100%\",\r\n\t\theight: \"100dp\",\r\n\t});\r\n\tfor (var labelIndex = 1; labelIndex <= 20; labelIndex++) {\r\n\t\thorizontalScrollView.add(Ti.UI.createLabel(\r\n\t\t{\r\n\t\t\ttext: \" Label \" + labelIndex.toString() + \" \",\r\n\t\t\tcolor: \"white\",\r\n\t\t\tbackgroundColor: \"gray\",\r\n\t\t\ttop: \"5dp\",\r\n\t\t\tleft: \"5dp\",\r\n\t\t}));\r\n\t}\r\n\tverticalScrollView.add(horizontalScrollView);\r\n}\r\nwindow.add(verticalScrollView);\r\nwindow.open();\r\n{code}\r\n\r\n*Result:*\r\nOnce you drag up or down while scrolling horizontally, the horizontal ScrollView's scrolling is canceled and only the parent vertical ScrollView can be scrolled.\r\n\r\n*Expected Result:*\r\nParent vertical ScrollView should not be scrollable while scrolling a child horizontal ScrollView. This was the old Android behavior. It is also the iOS behavior.\r\n\r\n*Cause:*\r\nScrollViews call the parent view's {{requestDisallowInterceptTouchEvent()}} method when scrolling has started. However, Google's {{SwipeRefreshLayout.requestDisallowInterceptTouchEvent()}} method ignores the request when made by a child view (in this case a {{HorizontalScrollView}}) that does not support nested scrolling. Since it's ignored, the parent ScrollView ends up intercepting and stealing the nested {{HorizontalScrollView}} touch events.\r\n[SwipeRefreshLayout.java#L735|https://github.com/aosp-mirror/platform_frameworks_support/blob/master/core-ui/src/main/java/android/support/v4/widget/SwipeRefreshLayout.java#L735]\r\n\r\n*Work-Around:*\r\nYou can restore the old behavior by listening to the horizontal ScrollView's \"dragstart\" and \"dragend\" events. In the \"dragstart\" event handler, disable the parent vertical ScrollView. In the \"dragend\" event handler, re-enable the parent vertical ScrollView.\r\n\r\n{code:javascript}\r\nhorizontalScrollView.addEventListener(\"dragstart\", function(e) {\r\n\tverticalScrollView.scrollingEnabled = false;\r\n});\r\nhorizontalScrollView.addEventListener(\"dragend\", function(e) {\r\n\tverticalScrollView.scrollingEnabled = true;\r\n});\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android: Scrolling horizontal ScrollView within a vertical ScrollView should disable vertical scrolling", "creator": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 } ], "comment": { "comments": [ { "id": "436556", "author": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/9985", "updateAuthor": { "name": "jquick", "key": "jquick", "displayName": "Joshua Quick", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-06T00:58:09.000+0000", "updated": "2018-04-06T00:58:09.000+0000" }, { "id": "436958", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed. PR merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-04-18T00:25:27.000+0000", "updated": "2018-04-18T00:25:27.000+0000" }, { "id": "438607", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix in SDK 7.3.0.v20180618182516.\r\nClosing.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-06-21T22:18:45.000+0000", "updated": "2018-06-21T22:18:45.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }