{ "id": "62358", "key": "TIMOB-1726", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:59.000+0000", "created": "2011-04-15T03:00:37.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "blur", "ios", "searchbar", "tableview" ], "versions": [], "issuelinks": [], "assignee": { "name": "rseagraves", "key": "rseagraves", "displayName": "Reggie Seagraves", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-11-29T05:06:46.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": "{html}

Another tableview bug I've noticed with a working test case.\nBasically I like to hide the navbar when searching as it creates\nmore room for the user to see his/her results. With a tableview\nwith custom labels in it and/or one with a custom row height (not\nsure which exactly), searching causes the first page of results to\nbe blank. It appears to be a rendering error as if you scroll past\nit and then back up, they are redrawn correctly.

\n

To reproduce, do the following: 1. Take the\ncode below, throw it in a navgroup (or tabgroup, whatever\nworks)...or change it slightly to make it its own window
\n2. When you go to the page, you'll see a list of rows. Search for\nthe text \"test\"
\n3. As you type you'll notice the results are shown correctly, no\nproblems here
\n4. Then, hit the blue Search button on the keyboard. The searchbar\nblur event is sent, and the navbar is restored. This clears the\nfirst page of results.
\n5. Scrolling down and back up shows the first page properly.

\n

I've confirmed this with both 1.4.0 and the 1.4.1 nightly from\n9/2/2010. The controls are contained in a rowView, but removing\nthat doesn't fix it. Also, trying to scroll the tableview to the\ntop to try to invoke a refresh doesn't work either.

\n

Here's the code:

\n
\nvar win = Ti.UI.currentWindow;\nvar max = 100;\nvar data = [];\n\nfor (var i=0; i<max; i++) {\n\n        var row = Ti.UI.createTableViewRow({\n            label:\"Testing: \" + i,\n            className:'testRow'+i,\n            height:100,\n        });\n\n        var rowView = Ti.UI.createView({ \n           top:0,\n           left:0, \n           height:100,\n        });\n    \n        var nameText = Ti.UI.createLabel({\n            font:{fontSize:18,fontWeight:'bold'},\n            left:70,\n            top:2,\n            height:25,\n            width:220,\n            text: \"Testing: \" + i\n        });\n        rowView.add(nameText);\n    row.add(rowView);\n    data[i] = row;\n}\n\n    //\n    // CREATE SEARCH BAR\n    //\n    //disable it for now due to bug rendering results (first few rows are blank after Search btn is selected)\n    // however, filtering while we type works fine...very weird...\n    var search = Ti.UI.createSearchBar({\n        showCancel:false\n    });\n    search.addEventListener('change', function(e) {\n       return e.value; // search string as user types\n    });\n    search.addEventListener('cancel', function(e) {\n       search.blur();\n    });\n    \n    //HAVING THIS HERE IS WHAT MESSES THE TABLE DISPLAY UP AFTER THE SEARCH BUTTON IS CLICKED \n    search.addEventListener('focus', function(e){\n        win.hideNavBar();\n    });\n     \n    search.addEventListener('blur', function(e){\n        win.showNavBar();\n    });\n    //////////////////\n\n\nvar tableview = Ti.UI.createTableView({\n    search:search,\n    data:data,\n    filterAttribute:'label'\n});\n\n\n//Setup\nwin.add(tableview);\n
{html}", "attachment": [], "flagged": false, "summary": "hideNavbar/showNavbar on tableview searchbar focus/blur whites out first page of results", "creator": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "robby", "key": "robby", "displayName": "Robby", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126467", "author": { "name": "jamesk", "key": "jamesk", "displayName": "James K", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I also have this problem.

\n

It would be nice to be able to reproduce Apple's search bar\nimplementation.

\n

version=1.5.0
\ntimestamp=11/21/10 21:50
\ngithash=9d2b18d

{html}", "updateAuthor": { "name": "jamesk", "key": "jamesk", "displayName": "James K", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:00:38.000+0000", "updated": "2011-04-15T03:00:38.000+0000" }, { "id": "126468", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Tested 1.6.0GM. Test in bugtests.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:00:38.000+0000", "updated": "2011-04-15T03:00:38.000+0000" }, { "id": "174163", "author": { "name": "mauriciom", "key": "mauriciom", "displayName": "Mauricio Meirelles", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is this fixed?\r\n\r\nBecause it's still happening to me (v1.8 / iOs 5).\r\n\r\n", "updateAuthor": { "name": "mauriciom", "key": "mauriciom", "displayName": "Mauricio Meirelles", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-29T05:06:46.000+0000", "updated": "2011-11-29T05:06:46.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }