{ "id": "93679", "key": "TIMOB-9725", "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": null, "resolutiondate": null, "created": "2012-06-22T06:15:04.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api", "qe-and060112" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:52.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "This is not a regression.It exists as far as 1.8.2\r\n\r\nSteps to reproduce:\r\n1) Use the code below:\r\n{code}\r\nvar win=Titanium.UI.createWindow();\r\nwin.backgroundColor='red';\r\nvar tf1 = null;\r\n\r\n\t\tfunction addRow() {\r\n\t\t\tvar row = Ti.UI.createTableViewRow({\r\n\t\t\t\tbackgroundColor: \"#000\",\r\n\t\t\t\theight : 80\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\ttf1 = Titanium.UI.createTextField({\r\n\t\t\t\tbackgroundColor: \"#fff\",\r\n\t\t\t\twidth : 250,\r\n\t\t\t\theight : 80,\r\n\t\t\t\tfocusable : true,\r\n\t\t\t\treturnKeyType : Titanium.UI.RETURNKEY_DONE,\r\n\t\t\t\tautocorrect : false,\r\n\t\t\t\tsuppressReturn : true,\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\ttf1.addEventListener('focus', function() {\r\n\t\t\t\talert('Focus fired');\r\n\t\t\t});\r\n\t\t\trow.add(tf1);\r\n\t\t\treturn row;\r\n\t\t}\r\n\t\t\r\n\t\tvar data = [];\r\n\t\t\r\n\t\tfor(var x = 0; x < 20; x++) {\r\n\t\t\tdata[x] = addRow();\r\n\t\t}\r\n\t\t\r\n\t\tvar tableView = Ti.UI.createTableView({\r\n\t\t\tdata : data,\r\n\t\t});\r\n\t\tTi.Gesture.addEventListener('orientationchange',function(){\r\n\t\t\ttf1.blur();\r\n\t\t\talert('blur fired');\r\n\t\t})\r\n\t\twin.add(tableView);\r\n\t\twin.open();\r\n{code}\r\n2) Run the app in portrait mode.\r\n3) Click on any row of the tableview.\r\n4) Click ok on the focus alert and rotate the device to landscape mode.\r\n5) Click ok on the blur event and click on any row of the tableview.\r\n6) Click ok on the focus alert and rotate the device back to portrait mode.\r\n\r\nExpected result:\r\n2) After step 2, app should be running with tableview shown along with 10 rows.\r\n3) 'Focus fired' alert and soft keyboard should be displayed.\r\n4) 'Blur fired' alert should be displayed and soft keyboard should be hidden.\r\n5) 'Focus fired' alert and soft keyboard should be displayed.\r\n6) 'Blur fired' alert should be displayed and soft keyboard should be hidden.\r\n\r\nActual result:\r\n2) After step 2, app gets running with tableview shown along with 10 rows.\r\n3) 'Focus fired' alert and soft keyboard gets displayed.\r\n4) 'Blur fired' alert is displayed and soft keyboard gets hidden.\r\n5) 'Focus fired' alert and soft keyboard gets displayed.\r\n6) 'Blur fired' alert is displayed and soft keyboard is not hidden.\r\n\r\nWhen the number of rows get out of screen,keyboard stops hiding on blur event call.If number of rows are kept like under 5,softkeyboard gets hide as expected.\r\n\r\nParticular issue -\r\nIn above code, replace\r\nvar win=Titanium.UI.createWindow();\r\nwin.backgroundColor='red';\r\n\r\nwith \r\n\r\nvar win = Ti.UI.createWindow({\r\n\t\tsoftInputMode : (Titanium.UI.Android) ? Ti.UI.Android.SOFT_INPUT_ADJUST_PAN : '',\r\n\t\twindowSoftInputMode : (Titanium.UI.Android) ? Ti.UI.Android.SOFT_INPUT_ADJUST_PAN : ''\r\n\t\t});\r\nNow portrait to landscape orientationchange will always hide the softkeyboard,but landscape to portrait would not hide it for larger(say >20) no. of rows.", "attachment": [], "flagged": false, "summary": "Android: Tableview:Softkeyboard hiding on blur event call depends on number of rows in tableview", "creator": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Tested with Titanium SDK: 2.1.0.v20120621184154\r\nTested with Titanium  Studio: 2.1.0.201206211609\r\nDevice - Android 2.2.2 LG-P970,Android 3.2 samsung galaxy tab 620,Android 4.0.2 samsung galaxy nexus\r\nMachine OS - MAC 10.7.3", "comment": { "comments": [ { "id": "240522", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The problem reproduces with release 3.0.2 and master release 3.1.0\r\n\r\nTitanium Studio, build: 3.0.1.201212181159\r\nTitanium SDK version: 3.1.0 \r\nTitanium SDK version: 3.0.2 \r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\n\r\nI observed that the issue is not consistant.Sometimes it shows expected behavior and sometimes its not.Most probably its a bug. \r\n\r\n", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-03-04T11:13:47.000+0000", "updated": "2013-03-04T12:33:38.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }