{ "id": "120485", "key": "TIMOB-15352", "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": "15699", "description": "2013 Sprint 21", "name": "2013 Sprint 21", "archived": true, "released": true, "releaseDate": "2013-10-18" }, { "id": "15700", "description": "2013 Sprint 21 API", "name": "2013 Sprint 21 API", "archived": true, "released": true, "releaseDate": "2013-10-18" } ], "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": "2013-11-14T19:32:38.000+0000", "created": "2013-09-26T15:35:02.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-21T21:46:05.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. Description of the issue\r\nHaving a table with search bar and pull-to-refresh view; when pulling the table down and swiping a bit up before releasing, the headerPullView and search bar are half hidden.\r\n\r\nh2. Steps to reproduce\r\n1) Use the code below\r\n2) Pull the table down\r\n3) Before releasing, swipe a bit up\r\n\r\nAttached a couple of screenshots of the result of these actions.\r\n\r\n{code}\r\nTitanium.UI.setBackgroundColor('#000');\r\nTi.UI.iPhone.statusBarStyle = Ti.UI.iPhone.StatusBar.LIGHT_CONTENT;\r\n\r\nvar tabGroup = Titanium.UI.createTabGroup();\r\n\r\nvar win1 = Titanium.UI.createWindow({\r\n title : 'Table with Search',\r\n backgroundColor : '#fff',\r\n barColor: 'black',\r\n statusBarStyle: Ti.UI.iPhone.StatusBar.LIGHT_CONTENT\r\n});\r\nvar tab1 = Titanium.UI.createTab({\r\n icon : 'KS_nav_views.png',\r\n title : 'Table w/ Search',\r\n window : win1\r\n});\r\n\r\nvar allNoteTypes = [];\r\nfor (var i=1; i<=30; i++) {\r\n\tallNoteTypes.push({\r\n\t\ttitle : 'Plan ' + i\r\n\t});\r\n}\r\n\r\nvar refreshView = Ti.UI.createView({\r\n width : \"100%\",\r\n top : 0,\r\n height : 22,\r\n backgroundColor : \"#000\"\r\n});\r\n\r\nvar lblRefreshTime = Ti.UI.createLabel({\r\n left : 5,\r\n width : '55%',\r\n text : \"refreshed 1 min ago\"\r\n});\r\n\r\nvar searchBar = Ti.UI.createSearchBar({\r\n barColor : \"#283D5A\",\r\n autocorrect : false,\r\n autocapitalization : Titanium.UI.TEXT_AUTOCAPITALIZATION_NONE,\r\n hintText : \"SR Number\",\r\n keyboardType : Ti.UI.KEYBOARD_NUMBERS_PUNCTUATION\r\n});\r\n\r\nvar table = Ti.UI.createTableView({\r\n top : 0,\r\n width : \"100%\",\r\n backgroundColor : 'transparent',\r\n hideSearchOnSelection : false,\r\n data : allNoteTypes,\r\n search : searchBar\r\n});\r\n\r\nrefreshView.add(lblRefreshTime);\r\nwin1.add(refreshView);\r\nwin1.add(table);\r\n\r\nvar border = Ti.UI.createView({\r\n backgroundColor : \"#576c89\",\r\n height : 2,\r\n bottom : 0\r\n});\r\n\r\nvar tableHeader = Ti.UI.createView({\r\n backgroundColor : \"#bcbdc1\",\r\n width : Ti.Platform.displayCaps.platformWidth,\r\n height : 60\r\n});\r\n\r\ntableHeader.add(border);\r\n\r\nvar statusLabel = Ti.UI.createLabel({\r\n text : \"Pull to Reload\",\r\n left : 55,\r\n bottom : 30,\r\n height : \"auto\",\r\n color : \"#FFF\",\r\n textAlign : \"center\"\r\n});\r\n\r\ntableHeader.add(statusLabel);\r\ntable.headerPullView = tableHeader;\r\n\r\nvar pulling = false;\r\nvar reloading = false;\r\n\r\nvar overlay = Ti.UI.createView({\r\n opacity:.2,\r\n backgroundColor:'black'\r\n});\r\n\r\nvar timeOutCounter;\r\n\r\nfunction beginReloading() {\r\n searchBar.add(overlay);\r\n table.scrollable = false;\r\n timeOutCounter = setTimeout(function(){\r\n Ti.API.info('TIMEOUT');\r\n endReloading();\r\n }, 2000);\r\n Ti.API.info('setTimeout returned '+timeOutCounter);\r\n}\r\n\r\nfunction endReloading() {\r\n Ti.API.info('END Reloading called. Current Counter '+timeOutCounter);\r\n clearTimeout(timeOutCounter);\r\n searchBar.remove(overlay);\r\n table.scrollable = true;\r\n table.setContentInsets({\r\n top : 0\r\n }, {\r\n animated : true\r\n });\r\n reloading = false;\r\n statusLabel.text = \"Pull down to refresh...\";\r\n}\r\n\r\nvar offset = 0;\r\ntable.addEventListener('scroll', function(e) {\r\n if (reloading) {\r\n return;\r\n }\r\n offset = e.contentOffset.y;\r\n if (offset <= -65.0 && !pulling) {\r\n pulling = true;\r\n statusLabel.text = \"Release to refresh...\";\r\n } else if (pulling && offset > -65.0 && offset < 0) {\r\n pulling = false;\r\n statusLabel.text = \"Pull down to refresh...\";\r\n }\r\n});\r\n\r\ntable.addEventListener('dragEnd', function(e) {\r\n if (reloading) {\r\n return;\r\n }\r\n if (pulling && !reloading && offset <= -65.0) {\r\n reloading = true;\r\n pulling = false;\r\n statusLabel.text = \"Reloading...\";\r\n table.setContentInsets({\r\n top : 60\r\n }, {\r\n animated : true\r\n });\r\n beginReloading();\r\n }\r\n});\r\n\r\nfunction handleSearchBarFocus(_event){\r\n Ti.API.info('FOCUS');\r\n endReloading();\r\n setTimeout(function(){\r\n searchBar.focus();\r\n },300);\r\n}\r\n\r\nfunction hideNavBar() {\r\n win1.hideNavBar();\r\n table.top = 22;\r\n}\r\n\r\nfunction showNavBar() {\r\n win1.showNavBar();\r\n table.top = 0;\r\n}\r\n\r\noverlay.addEventListener(\"click\", handleSearchBarFocus);\r\n\r\nsearchBar.addEventListener(\"focus\", hideNavBar);\r\nsearchBar.addEventListener(\"blur\", showNavBar);\r\n\r\ntabGroup.addTab(tab1);\r\ntabGroup.open();\r\n{code}", "attachment": [ { "id": "42857", "filename": "iOS Simulator Screen shot 30 Sep 2013 19.24.35.png", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-30T17:25:20.000+0000", "size": 44164, "mimeType": "image/png" }, { "id": "42858", "filename": "iOS Simulator Screen shot 30 Sep 2013 19.24.36.png", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-30T17:25:20.000+0000", "size": 45684, "mimeType": "image/png" }, { "id": "43394", "filename": "ScreenShot1.PNG", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T09:41:14.000+0000", "size": 40080, "mimeType": "image/png" }, { "id": "43395", "filename": "ScreenShot2.PNG", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T09:41:14.000+0000", "size": 41334, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Pull to Refresh view not displaying correctly when swiping up before releasing", "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": "iOS7\r\nSDK 3.1.3", "comment": { "comments": [ { "id": "274070", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Well if you are swiping up then you should cancel reload.\nModify the scroll listener as shown below\n{code}\ntable.addEventListener('scroll', function(e) {\n offset = e.contentOffset.y;\n if (reloading) {\n if (offset > -60) \n {\n endReloading();\n };\n return;\n }\n if (offset <= -65.0 && !pulling) {\n pulling = true;\n statusLabel.text = \"Release to refresh...\";\n } else if (pulling && offset > -65.0 && offset < 0) {\n pulling = false;\n statusLabel.text = \"Pull down to refresh...\";\n }\n});\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-07T21:06:50.000+0000", "updated": "2013-10-07T21:06:50.000+0000" }, { "id": "276319", "author": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is still reproducible in below environment. Please see the attached screen shots. Hence reopening this issue.\nAppc Studio - 3.2.0.201310181700\nSDK - 3.2.0.v20131022171645\nacs -1.0.7\nalloy - 1.2.2\ntitanium - 3.2.0\ntitanium-code-processor - 1.0.3\nXcode - 5.0.1\nOS - Mac OS X Mavericks (10.9)\nDevice - iPodTouch1 (v7.0.2)\n", "updateAuthor": { "name": "djha", "key": "djha", "displayName": "Dhirendra Jha", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-23T09:42:02.000+0000", "updated": "2013-10-23T09:42:02.000+0000" }, { "id": "279604", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "The blackbar is their own js UI issue. Not ours. The workaround provided works", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-11-14T19:32:38.000+0000", "updated": "2013-11-14T19:32:38.000+0000" }, { "id": "414494", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue cannot be reproduced and due to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-21T21:46:05.000+0000", "updated": "2017-03-21T21:46:05.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }