{ "id": "94346", "key": "TIMOB-9869", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-07-12T12:07:19.000+0000", "created": "2012-07-03T04:54:11.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "18744", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "91015", "key": "TIMOB-8933", "fields": { "summary": "iOS: Redefine \"scroll\" event in ScrollableView, and add \"scrollEnd\"", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-24T18:08:53.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 description\r\nWhen scrolling from view to view in a ScrollableView, the 'scroll' event is called multiple times. This was working fine with previous versions of the SDK (e.g. 2.0.2.GA). This also causes the app to freeze sometimes.\r\n\r\nh2. Steps to reproduce\r\n1. Create an app with the code below\r\n2. Test the app on the iOS Simulator, using SDK 2.1.0.GA\r\n\r\n~~~\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar view1 = Ti.UI.createView({ backgroundColor:'#123' });\r\nvar view2 = Ti.UI.createView({ backgroundColor:'#246' });\r\nvar view3 = Ti.UI.createView({ backgroundColor:'#48b' });\r\n\r\nscrollableView = Titanium.UI.createScrollableView({\r\n views:[view1, view2, view3],\r\n showPagingControl:false,\r\n top:10,\r\n height: 400,\r\n});\r\n\r\nscrollableView.addEventListener('scroll', function(e)\r\n{\r\n activeView = e.view;\r\n\r\n if (e.currentPage != null && e.currentPage != undefined &&\r\n e.currentPage != 'undefined') {\r\n Ti.API.log (\"scroll called - current index \" + i);\r\n }\r\n});\r\n\r\nwin.add(scrollableView);\r\nwin.open();\r\n~~~\r\n\r\nh2. Current result\r\nWhen scrolling from a view to another, the scroll event is called more than once (see the console logs).\r\n\r\nh2. Expected result\r\nThe 'scroll' event is fired only once, when scrolling from a view to another. Testing the same code with SDK 2.0.2.GA works just fine.", "attachment": [], "flagged": false, "summary": "iOS: ScrollableView event 'scroll' is fired multiple times", "creator": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Product: Mobile\r\nTitanium SDK: 2.1.0.GA\r\nPlatform OS: iOS\r\nPlatform OS Version: 5.1", "comment": { "comments": [ { "id": "202023", "author": { "name": "syaob", "key": "syaob", "displayName": "saikou baldé", "active": true, "timeZone": "America/Los_Angeles" }, "body": "thats maybe help you (this behavor is caused by New in Release 2.1.0.GA): \r\n\r\n\r\nScrollableView scroll event enhancements. Prior to Release 2.1, the ScrollableView scroll event behavior was not consistent with the scroll event on other views. On Android, it fired when dragging ended, and on iOS it fired when the view finished scrolling. To be more consistent with other views, the scroll event was redefined to fire continuously while the view is scrolling.\r\nTo obtain the previous behavior on Android, add a listener for the dragEnd event instead. To obtain the previous behavior on iOS, add a listener for the scrollEnd event instead.", "updateAuthor": { "name": "syaob", "key": "syaob", "displayName": "saikou baldé", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-08T04:37:47.000+0000", "updated": "2012-07-08T04:37:47.000+0000" }, { "id": "203082", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "For consistency with Table and Scroll views, the act of scrolling continuously fires the 'scroll' event, and the act of stopping a scroll now fires the 'scrollEnd' event. Apps should have these event listeners updated to reflect the change.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-12T21:53:49.000+0000", "updated": "2012-07-12T21:53:49.000+0000" }, { "id": "415627", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-24T18:08:53.000+0000", "updated": "2017-03-24T18:08:53.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }