{ "id": "113169", "key": "TIMOB-13689", "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": "2013-05-10T17:21:30.000+0000", "created": "2013-04-20T13:18:01.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2017-03-29T17:17:13.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": "*Actual behavior*\r\nUsing window.windowSoftInputMode = Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE; the keyboard automatically shows when the application starts.\r\n\r\nAlso, the input text always keep its focus i.e. the cursor keeps blinking and the TextField is always blue even if the blur() method is called. \r\n\r\n*Expected behavior*\r\nThe keyboard should not show automatically when using SOFT_INPUT_ADJUST_RESIZE.\r\n\r\nThe TextField should lose focus when calling the blur() method, and should probably lose focus when tapping the window, too.\r\n\r\n*Test case*\r\n{code:javascript}\r\nTi.Android.currentActivity.setRequestedOrientation(Ti.Android.SCREEN_ORIENTATION_PORTRAIT);\r\n\r\nvar win = Ti.UI.createWindow({\r\n\ttitle : 'Lab',\r\n\tbackgroundColor : 'white',\r\n\tfullscreen : false,\r\n\tnavBarHidden : true,\r\n\texitOnClose : true,\r\n\torientationModes : [Titanium.UI.PORTRAIT]\r\n});\r\nwin.windowSoftInputMode = Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE;\r\n\r\nvar text = Ti.UI.createTextField({\r\n\twidth : Ti.UI.FILL,\r\n\thintText : 'Search Lebanon',\r\n\ttop : 0\r\n});\r\nwin.add(text);\r\n\r\nvar blurBtn = Ti.UI.createButton({\r\n\ttitle : 'Blur',\r\n\ttop : 70\r\n});\r\nblurBtn.addEventListener('click', function(e) {\r\n\ttext.blur();\r\n});\r\nwin.add(blurBtn);\r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: SOFT_INPUT_ADJUST_RESIZE causes keyboard to show on start, and TextField doesn't lose focus", "creator": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "subtasks": [], "reporter": { "name": "sameeh.harfoush", "key": "sameeh.harfoush", "displayName": "Sameeh Harfoush ", "active": true, "timeZone": "Asia/Beirut" }, "environment": "Titanium SDK 3.1 GA\r\nAndroid 4.0.4\r\nXperia P\r\nSamsung Galaxy S2", "comment": { "comments": [ { "id": "249163", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed with Samsung Galaxy S2 Android 2.3.6 on 3.0.2 GA and 3.1 GA.\r\n\r\nThis is not a regression between 3.0.2 and 3.1 - it's exactly the same behavior. It continues blinking even when blur() is called with both SDKs.\r\n\r\nIf have simplified the test case to isolate the issue.\r\n\r\n@Sameeh - It would be a bonus if you could try the simplified test case and let me know if it still covers all the issues you described, and to also clarify that there is no regression.\r\n\r\nEdit: The regression might only occur on your specific device...\r\n\r\nMoving to TiMob.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-26T18:19:25.000+0000", "updated": "2013-04-26T18:21:46.000+0000" }, { "id": "251324", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Since textField is the only focusable control, it gets focus and keyboard is shown. If you don't want the keyboard to be shown when the activity is starting, set win.windowSoftInputMode = Ti.UI.Android.SOFT_INPUT_STATE_HIDDEN|Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE;\r\n\r\nSince there is no other focusable control, calling blur will set the focus again on the textfield", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2013-05-10T17:21:30.000+0000", "updated": "2013-05-10T17:21:30.000+0000" }, { "id": "416197", "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-29T17:17:13.000+0000", "updated": "2017-03-29T17:17:13.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }