{ "id": "129505", "key": "AC-793", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "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": "2014-07-29T06:59:07.000+0000", "created": "2014-04-21T17:35:16.000+0000", "labels": [ "3.2.2.GA", "alloy", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:37:04.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": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When using a scrollView, there is a case (the \"y\" event is negative) when setting scrollingEnabled to false causes the scrollView to scroll to top position (instead of just disabling the scroll and remaining on the current position).\r\n\r\nTest case:\r\n\r\nvar scroll = Ti.UI.createScrollView({\r\n height: Ti.UI.FILL,\r\n width: Ti.UI.FILL\r\n});\r\n\r\nvar view1 = Ti.UI.createView({\r\n height: 2000,\r\n backgroundColor: 'black'\r\n});\r\n\r\nscroll.add(view1);\r\nscroll.scrollTo(0,-50); // HAS TO BE A NEGATIVE VALUE !!!\r\nscroll.scrollingEnabled = false;\r\n", "attachment": [], "flagged": false, "summary": "In a scrollview, the scrollingEnabled property is causing a scrollToTop", "creator": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS, SDK 3.2.2GA", "comment": { "comments": [ { "id": "301919", "author": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sorry, I just realized I opened this in the wrong place.", "updateAuthor": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-21T18:06:41.000+0000", "updated": "2014-04-21T18:06:41.000+0000" }, { "id": "303006", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Let us know if we should resolve it then.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-04-30T05:08:05.000+0000", "updated": "2014-04-30T05:08:05.000+0000" }, { "id": "303169", "author": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes, please.\r\nI just thought for a sec it should be in TIMOB.", "updateAuthor": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-01T15:59:26.000+0000", "updated": "2014-05-01T15:59:26.000+0000" }, { "id": "303413", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I ran your test with and without setting scrollingEnabled and the behavior is same i.e. it does not scroll to the top. Here is the updated test case that does not reproduce this issue.\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\nvar scroll = Ti.UI.createScrollView(\r\n{ height: Ti.UI.FILL, width: Ti.UI.FILL }\r\n);\r\nvar view1 = Ti.UI.createView(\r\n{ height: 500, backgroundColor: 'blue' }\r\n);\r\nscroll.add(view1);\r\nscroll.scrollTo(0,-50); // HAS TO BE A NEGATIVE VALUE !!!\r\nscroll.scrollingEnabled = false;\r\nwin.add(view1);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-04T05:42:12.000+0000", "updated": "2014-05-04T05:42:12.000+0000" }, { "id": "303474", "author": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ok, I reviewed my test case, turns out the problem only happens during a scroll event.\r\n\r\nTry this test case:\r\n\r\n{code:title=index.js|borderStyle=solid}\r\nvar scroll = Ti.UI.createScrollView(\r\n{ height: Ti.UI.FILL, width: Ti.UI.FILL }\r\n);\r\nvar view1 = Ti.UI.createView(\r\n{ height: 2500, backgroundColor: 'blue' }\r\n);\r\nscroll.add(view1);\r\n$.win.add(scroll);\r\n$.win.open();\r\nscroll.addEventListener('scroll', function(e) {\r\n\tTi.API.info(e.y);\r\n\tif (e.y < -60) {\r\n\t\tscroll.scrollingEnabled=false;\r\n\t}\r\n});\r\n{code}\r\n\r\n\r\nWhat you will see: When you scroll down to -60, the view1 (blue background) immediately scrolls back to the top.\r\nWhats is expected: view1 should be locked in place, only scrolling should be disabled.\r\n", "updateAuthor": { "name": "alvesl", "key": "alvesl", "displayName": "Lucas Alves", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-05-05T13:51:07.000+0000", "updated": "2014-05-05T13:51:07.000+0000" }, { "id": "308603", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I still cannot reproduce this issue with the provided test. Can you please zip up your test project and attach it to this ticket?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-06-12T04:57:33.000+0000", "updated": "2014-06-12T04:57:33.000+0000" }, { "id": "316105", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Tried with the attached testcase without success. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-29T06:59:07.000+0000", "updated": "2014-07-29T06:59:07.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }