{ "id": "87407", "key": "TIMOB-7893", "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": "13404", "description": "Sprint 2012-12 Core", "name": "Sprint 2012-12 Core", "archived": true, "released": true, "releaseDate": "2012-06-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-06-13T15:49:15.000+0000", "created": "2012-03-06T08:13:35.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_scrollview", "qe-testadded" ], "versions": [ { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" } ], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-03T15:06: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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h2. Problem\r\n\r\nAccording to stramer in [this comment|https://github.com/appcelerator/titanium_mobile/pull/1515/files#r492538], the [Titanium.UI.ScrollView|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.ScrollView-object] [canCancelEvents|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.ScrollView.canCancelEvents-property.html] property does not work due to an invalid setter.\r\n\r\n\r\nOnce fixed, add the following back to the documentation:\r\n\r\n{code:lang=none|title=ScrollView.yml}\r\n - name: canCancelEvents\r\n summary: |\r\n Determines whether this scroll view can cancel subview touches in order to scroll instead.\r\n description: Set to `false` to ensure that subview touches always take effect.\r\n type: Boolean\r\n default: true\r\n platforms: [iphone, ipad]\r\n{code}\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: UI.ScrollView - canCancelEvents property does not work", "creator": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "environment": "* iOS\r\n", "comment": { "comments": [ { "id": "197310", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Test case:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n \r\nvar status = Ti.UI.createLabel({\r\n text: ' ', textAlign: 'center',\r\n zIndex: 1,\r\n right: 0, bottom: 0, left: 0,\r\n height: 60,\r\n backgroundColor: 'black',\r\n color: 'white'\r\n});\r\nwin.add(status);\r\n \r\nvar scroll = Ti.UI.createScrollView({\r\n scrollType: 'vertical',\r\n contentHeight: 3010,\r\n canCancelEvents: false,\r\n bottom: 60\r\n});\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', curry('Touch Start'));\r\nscroll.addEventListener('touchmove', curry('Touch Move'));\r\nscroll.addEventListener('touchcancel', curry('Touch Cancel'));\r\nscroll.addEventListener('touchend', curry('Touch End'));\r\nwin.add(scroll);\r\nwin.open();\r\n \r\nfunction curry(eventName) {\r\n return function (evt) {\r\n \t// Ti.API.info('Event Fired On: ' + eventName);\r\n if (evt.source && evt.source.draggable) {\r\n status.text = eventName + ' at { x: ' + (evt.x | 0) + ', y: ' + (evt.y | 0) + ' }';\r\n var global = evt.source.convertPointToView({ x: evt.x, y: evt.y }, scroll);\r\n evt.source.left = global.x - width / 2;\r\n }\r\n }\r\n}\r\n{code}\r\n\r\n1. Launch app\r\n2. Drag one of the boxes up and down, then left and right.\r\n\r\nExpected behavior:\r\nThe view should not scroll up and down, and you should be able to drag the box left/right.\r\n\r\nActual behavior:\r\nThe view will scroll up/down when you try to drag the box vertically. Afterwards you can no longer drag it left and right.", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T10:44:03.000+0000", "updated": "2012-06-12T14:34:03.000+0000" }, { "id": "197312", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/2325", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-05T10:47:29.000+0000", "updated": "2012-06-05T10:47:29.000+0000" }, { "id": "198051", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening issue\r\n\r\nTested with Ti Studio build 2.1.0.201206081630\r\nTi Mobile SDK 2.1.0.v20120608174150 hash r08baf035\r\nOSX Lion 10.7.3\r\niPhone 4S OS 5.0.1\r\n\r\nWhen I scroll the box horizontally, erratic behavior is shown (e.g. the box starts moving left and right and I can still scroll vertically)", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-11T13:31:13.000+0000", "updated": "2012-06-11T14:43:28.000+0000" }, { "id": "198251", "author": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The erratic behavior is probably a bug with the test case. We are really testing whether we get the cancel event or not.\r\n\r\nWith \"canCancelEvents\" enabled, we should get the cancel event when you select a label, and move down.\r\n\r\nWith \"canCancelEvents\" disabled, we should not get the cancel event when you select a label, and move down.\r\n\r\nCould you retest and make sure this passes?\r\n", "updateAuthor": { "name": "ayeung", "key": "ayeung", "displayName": "Allen Yeung", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-12T15:43:59.000+0000", "updated": "2012-06-12T15:43:59.000+0000" }, { "id": "198388", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The test provided by Allen works correctly. Note that while the label is being dragged ('touchmove' event) the scroll view will NOT scroll. However, as soon as the label reaches the edge of the content view and cannot be moved further, the 'touchend' event is fired (meaning the label is no longer being tracked) and this is when the scroll view can scroll.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-13T15:49:15.000+0000", "updated": "2012-06-13T15:49:15.000+0000" }, { "id": "199947", "author": { "name": "mgadiya", "key": "mgadiya", "displayName": "Mukesh Gadiya", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the following:\r\n\r\nwhen canCancelEvents is set to FALSE\r\n1. Scroll horizontally within the label(subview) and scrollview does not scroll \r\n2. Scroll vertically within the label and scrollview DOES NOT scroll\r\nwhen canCancelEvents is set to TRUE\r\n1. Scroll horizontally within the label(subview) and scrollview does not scroll \r\n2. Scroll vertically within the label and scrollview DOES scroll vertically\r\n\r\nIphone 4S verizon 5.0.1\r\nSDK: 2.1.0.v20120622174154\r\nOS: Lion 10.7.3", "updateAuthor": { "name": "mgadiya", "key": "mgadiya", "displayName": "Mukesh Gadiya", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-23T15:20:34.000+0000", "updated": "2012-06-23T15:20:34.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }