{ "id": "84798", "key": "TIMOB-7136", "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": "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": "2012-02-09T14:46:21.000+0000", "created": "2012-01-12T09:13:59.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "regression" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-27T18:23: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": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h2.Problem\r\n\r\nWhen TextField.focus() is called twice, the soft keyboard displays even though the window has been created using {{windowSoftInputMode:Ti.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN}}.\r\n\r\nThe first {{TextField.focus()}} call focuses the TextField correctly, and the keyboard does not appear (this is expected behavior).\r\n\r\nWhen TextField.focus() is called again, while the TextField has focus, the keyboard incorrectly appears.\r\n\r\nThere is a regression in the 1.9.0.v20120111233134 SDK. The problem did not occur with 1.8.0.1 or earlier.\r\n\r\nh2. Test Case\r\n\r\n# drop the following app.js code into a new project\r\n# build with SDK 1.8.0.1\r\n# click the button once...the edit gets focus & no keyboard shows.\r\n# click the button again...the edit is still focused & still no keyboard.\r\n\r\n# rebuild with SDK 1.9.0.v20120111233134\r\n# click the button once...the edit gets focus & no keyboard shows.\r\n# click the button again...the edit is still focused *but now the keyboard pops up.* This is the problem.\r\n\r\n{code:language=none|title=app.js}\r\nvar win1 = Ti.UI.createWindow({ \r\n backgroundColor:'#fff',\r\n windowSoftInputMode:Ti.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN,\r\n exitOnClose:true,\r\n navBarHidden:true\r\n});\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n color:'#999',\r\n text:'I am Window 1',\r\n font:{fontSize:20,fontFamily:'Helvetica Neue'},\r\n textAlign:'center',\r\n width:'auto',\r\n top:100\r\n});\r\nwin1.add(label1);\r\n\r\nvar edit1=Ti.UI.createTextField({\r\n width:100,\r\n top:130\r\n});\r\nwin1.add(edit1);\r\n\r\nvar btn1 = Ti.UI.createButton({\r\n title:'Focus Edit',\r\n width:'auto',\r\n left:10,\r\n top:175\r\n});\r\nfunction DoBtn1Click()\r\n{\r\n edit1.focus();\r\n}\r\nbtn1.addEventListener('click',DoBtn1Click);\r\nwin1.add(btn1);\r\n\r\nwin1.open();\r\n{code}\r\n", "attachment": [], "flagged": false, "summary": "Android - UI.TextField.focus() called more than once displays soft keyboard despite windowSoftInputMode value", "creator": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "environment": "* Titanium Mobile 1.9.0.v20120111233134\r\n* Android 2.2 emulator\r\n* Windows XP\r\n", "comment": { "comments": [ { "id": "179071", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "attached failcase code.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-01-12T11:14:09.000+0000", "updated": "2012-01-12T11:14:09.000+0000" }, { "id": "179101", "author": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "body": "Good ticket, Shawn. Thanks! Escalating.\r\n", "updateAuthor": { "name": "pdowsett", "key": "pdowsett", "displayName": "Paul Dowsett", "active": true, "timeZone": "Europe/London" }, "created": "2012-01-12T12:41:59.000+0000", "updated": "2012-01-12T12:41:59.000+0000" }, { "id": "182655", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Functional tested with 1.9.0.169f35e and AVD 2.2. Going to mark CAN'T REPRODUCE.\r\n\r\nNote, however, that the described behavior doesn't quite match up with the expected behavior according to the Android documentation; see [SOFT_INPUT_STATE_ALWAYS_HIDDEN|http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#SOFT_INPUT_STATE_ALWAYS_HIDDEN] in their docs. It sounds like when the text field is focused the soft keyboard should always display from this description, but I could be wrong.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-09T14:45:34.000+0000", "updated": "2012-02-09T14:46:00.000+0000" }, { "id": "182656", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Can't reproduce 1.9.0.169f35e.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-09T14:46:22.000+0000", "updated": "2012-02-09T14:46:22.000+0000" }, { "id": "182729", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Verified fixed in SDK 1.8.1.\r\n\r\nStephen, the \"expected behavior\" that I listed seems to me to agree with the description in the link you provided: \"_always hide any soft input area when this window receives focus_\". Translated to this specific case: always hide the soft keyboard when this TextField receives focus.\r\n\r\nAnyway, it seems to have been fixed between 01/11/2012 and the release of 1.8.1.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2012-02-10T05:46:29.000+0000", "updated": "2012-02-10T05:46:29.000+0000" }, { "id": "415896", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as I am unable to reproduce this issue with the following environment;\r\nPixel (7.1)\r\nMacOS 10.11.6 (15G31)\r\nStudio 4.8.1.201612050850\r\nTi SDK 6.0.3 GA\r\nAppc NPM 4.2.8\r\nAppc CLI 6.1.0\r\nTi CLI 5.0.11\r\nAlloy 1.9.5\r\nArrow 1.10.1\r\nXcode 8.2 (8C38)\r\nNode v4.6.0\r\nJava 1.7.0_80", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-27T18:23:05.000+0000", "updated": "2017-03-27T18:23:05.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }