{ "id": "86306", "key": "TIMOB-7609", "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": "15079", "description": "2013 Sprint 02 API", "name": "2013 Sprint 02 API", "archived": true, "released": true, "releaseDate": "2013-01-28" }, { "id": "14812", "description": "2013 Sprint 02", "name": "2013 Sprint 02", "archived": true, "released": true, "releaseDate": "2013-01-28" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2013-01-17T15:47:00.000+0000", "created": "2012-02-09T21:50:13.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api" ], "versions": [ { "id": "12580", "description": "Dual Runtime 1.8.0", "name": "Release 1.8.0.1", "archived": true, "released": true, "releaseDate": "2011-12-22" }, { "id": "12593", "name": "Release 2.0.0", "archived": false, "released": true, "releaseDate": "2012-03-30" }, { "id": "13070", "description": "Release 1.8 Service Pack 2", "name": "Release 1.8.2", "archived": true, "released": true, "releaseDate": "2012-02-29" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-11-07T18:54:02.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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h4. Description\r\nWhen window opens, it immediately focuses to the searchbar inside tableview showing keyboard by default. This behavior is experienced in some devices only. I experienced it in Samsung Galaxy SII. The keyboard doesn't show up by default in Motorola DROID (old). This happens only in some devices,it runs perfectly in the emulator \r\n\r\nThis is happening in Google Nexus Tablet 7 (with AndroidOS 4.1).\r\n\r\nh4. Repo Steps\r\n1. Run the below code.\r\n2. You can see the keyboard appears by default immediately when the window opens.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor: '#000000'});\r\n\r\nvar search = Titanium.UI.createSearchBar({\r\n\tbarColor:'#000',\r\n\tshowCancel:true,\r\n\theight:43,\r\n\ttop:0\r\n});\r\n\r\n// create table view data object\r\nvar data = [\r\n\t{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff'},\r\n\t{title:'Row 2', hasDetail:true, color:'green', selectedColor:'#fff'},\r\n\t{title:'Row 3', hasCheck:true, color:'blue', selectedColor:'#fff'},\r\n\t{title:'Row 4', color:'orange', selectedColor:'#fff'},\r\n\t{title:'Row 5'},\r\n\t{title:'Row 6'},\r\n\t{title:'Row 7'},\r\n\t{title:'Row 8'},\r\n\t{title:'Row 9'},\r\n\t{title:'Row 10'},\r\n\t{title:'Row 11'},\r\n];\r\n\r\n// create table view\r\nvar tableview = Titanium.UI.createTableView({\r\n\tdata:data,\r\n\tsearch:search \r\n});\r\n\r\n// add table view to the window\r\nwin.add(tableview);\r\n\r\nwin.addEventListener('focus', function(e) {\r\n\tsearch.blur();\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: Searchbar gets the focus when inside the tableview showing keyboard by default ", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "android 2.3.4\r\nSamsung Galaxy SII\r\nMotorola DROID (old)\r\nGoogle Nexus Tablet 7", "comment": { "comments": [ { "id": "218221", "author": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "body": "Are there any known workarounds? Tried to find a workaround for days.", "updateAuthor": { "name": "jicks83", "key": "jicks83", "displayName": "Jick Steen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-09-10T13:17:12.000+0000", "updated": "2012-09-10T13:17:12.000+0000" }, { "id": "229991", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Focus and keyboard behavior are very device specific in the Android ecosystem.Have you tried setting windowSoftInputMode to hidden on the window? \n\nhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Window-property-windowSoftInputMode\nhttp://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Android-property-SOFT_INPUT_STATE_HIDDEN", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-12-04T23:28:40.000+0000", "updated": "2012-12-04T23:28:40.000+0000" }, { "id": "230661", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with 2.1.4.GA, latest 3.0CI and 3.1CI builds. The issue is reproducible. This is also seen in Nexus 7 tablet.", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-12-10T19:15:05.000+0000", "updated": "2012-12-10T19:15:05.000+0000" }, { "id": "234817", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Adding windowSoftInputMode: Ti.UI.Android.SOFT_INPUT_STATE_HIDDEN to the window seems to work for me.", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-17T15:41:10.000+0000", "updated": "2013-01-17T15:41:10.000+0000" }, { "id": "247030", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Since the issue is device specific as mentioned in the comments, So, closing the issue.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-11T08:55:54.000+0000", "updated": "2013-04-11T08:55:54.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }