{ "id": "82463", "key": "TIMOB-6060", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "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": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-05-14T15:23:30.000+0000", "created": "2011-11-08T09:04:10.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [ { "id": "30274", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "63741", "key": "TIMOB-3109", "fields": { "summary": "Blur & MODAL_PRESENTATION_FORMSHEET == Keyboard not hiding.", "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" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-06-10T00:13:32.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": "When using the MODAL_PRESENTATION_FORMSHEET modal style, iOS by default does not dismiss the keyboard even when text fields are blurred. iOS 4.3 and later allows us to override this, but this property is not currently exposed.\r\n\r\nThis will be an iOS-only property on the Ti.UI.Window class, and will not apply to Android.\r\n\r\nIn the mean time, MODAL_PRESENTATION_PAGESHEET is perfectly sufficient.\r\n\r\n(Not a bug, but leaving old comments)\r\n\r\nh1. Problem\r\nWhen blurring a text field in a modal window, the keyboard doesn't go away.\r\n\r\nh2. Reproduction\r\nDrop the following in an app.js, and click in the text field. It automatically blurs itself after gaining focus. If you change \"modal: true\" to \"modal: false\", the keyboard will properly hide itself.\r\n\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar textField = Ti.UI.createTextField({\r\n value: '1. Touch Me',\r\n height: 34, top: 10, left: 10, right: 10,\r\n borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED\r\n});\r\ntextField.addEventListener('focus', function () {\r\n Ti.API.info('blurring');\r\n textField.blur();\r\n Ti.API.info('blurred');\r\n});\r\nwin.add(textField);\r\n\r\nwin.open({\r\n modal: true,\r\n modalStyle: Ti.UI.iPhone.MODAL_PRESENTATION_FORMSHEET\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Blurring Textfield in Modal Window Doesn't Dismiss Keyboard", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": "Version=1.8.0\r\niPad Simulator 4.3 and 5.0, and on iPad 2 running iOS 5 GM.", "closedSprints": [ { "id": 404, "state": "closed", "name": "2015 Sprint 10 SDK", "startDate": "2015-05-09T00:00:53.391Z", "endDate": "2015-05-23T00:00:00.000Z", "completeDate": "2015-05-25T14:55:16.386Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "171924", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is actually not a bug, but due to Apple's design. Namely, in http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html :\r\n\r\n\"The default implementation of this method returns YES when the modal presentation style of the view controller is set to UIModalPresentationFormSheet and returns NO for other presentation styles. Thus, the system normally does not allow the keyboard to be dismissed for modal forms.\"\r\n\r\nThe method that we can override for this is available in iOS 4.3 and later, so any feature request to change this behavior would not change 3.x to 4.2.\r\n\r\nUpdating bug to be feature request instead.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-08T11:15:37.000+0000", "updated": "2011-11-08T11:15:37.000+0000" }, { "id": "171986", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Talked with Dawson, he's going to ping customer and see if it's a must-have for 1.8 or if this can fall into TBS, especially since some versions of 4.0 won't support this.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-08T16:06:09.000+0000", "updated": "2011-11-08T16:06:09.000+0000" }, { "id": "183499", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Tim - We are probably not going to get to it in the next release but we can schedule it for later.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-16T18:22:12.000+0000", "updated": "2012-02-16T18:25:51.000+0000" }, { "id": "287680", "author": { "name": "e.redwan", "key": "e.redwan", "displayName": "Esau", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It's now 2014 and this feature hasn't been implemented. I got into a mini-hair pulling craze for a while when I couldn't figure out why something as simple as blurring wasn't working for me. I then started to doubt my coding skills. However, at last! I found this gem here explaining the details. I don't want to use a full screen modal and the FORMSHEET looks more sleek having the content in the background still showing.\r\n\r\nThis is important for my apps user interaction because the keyboard needs to hide after doing something else in the modal box to reveal the Save button. I've seen at least 3 people now being confused on what to do because the keyboard blocks the Save. I can move the Save button but it won't look as good.\r\n\r\nI was wondering what work around is there to this other than using PAGESHHEET? ", "updateAuthor": { "name": "e.redwan", "key": "e.redwan", "displayName": "Esau", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-10T18:53:03.000+0000", "updated": "2014-01-10T18:53:03.000+0000" }, { "id": "287689", "author": { "name": "e.redwan", "key": "e.redwan", "displayName": "Esau", "active": true, "timeZone": "America/Los_Angeles" }, "body": "http://stackoverflow.com/questions/3372333/ipad-keyboard-will-not-dismiss-if-modal-view-controller-presentation-style-is-ui\r\n{code:title=objective-c method|borderStyle=solid}\r\n- (BOOL)disablesAutomaticKeyboardDismissal {\r\n return NO;\r\n}\r\n{code}\r\n\r\nDoing this on objective-c will make this work. Where do I apply this for titanium?", "updateAuthor": { "name": "e.redwan", "key": "e.redwan", "displayName": "Esau", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-10T19:28:54.000+0000", "updated": "2014-01-10T19:28:54.000+0000" }, { "id": "294758", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "my question is: why is this ticket still open? I stumbled open this bug after 3 years it was reported. And it still happens with TiSDK 3.2.1 .", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-02-26T07:45:15.000+0000", "updated": "2014-02-26T07:45:15.000+0000" }, { "id": "294794", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~a.marcone] it appears to have just slipped by. Thank you for reminding us. Seeing when we can schedule it in.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-26T16:40:38.000+0000", "updated": "2014-02-26T16:40:48.000+0000" }, { "id": "294831", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "awesome! thank you for taking care of it.", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-02-26T19:40:57.000+0000", "updated": "2014-02-26T19:40:57.000+0000" }, { "id": "301400", "author": { "name": "mike@teamworkpm.net", "key": "mike@teamworkpm.net", "displayName": "Mike Butler", "active": true, "timeZone": "Europe/London" }, "body": "This is causing awkward usability problems for us too. Any ETA on when it will be fixed?", "updateAuthor": { "name": "mike@teamworkpm.net", "key": "mike@teamworkpm.net", "displayName": "Mike Butler", "active": true, "timeZone": "Europe/London" }, "created": "2014-04-18T10:59:20.000+0000", "updated": "2014-04-18T10:59:20.000+0000" }, { "id": "305667", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "ok, 3 months passed by, and still not scheduled. Anyone? Please?", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-05-20T09:29:26.000+0000", "updated": "2014-05-20T09:29:26.000+0000" }, { "id": "305926", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "ok, I will be honest: being scheduled for the 3.4.0 means that we'll be stuck with this bug for the next 7 months. Kinda frustrating. Thank you anyways, I'm sure you're doing your job like I'm doing mine.. but it's been reported 3 years ago..", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-05-21T15:37:37.000+0000", "updated": "2014-05-21T15:37:37.000+0000" }, { "id": "342376", "author": { "name": "cornflakesuperstar", "key": "cornflakesuperstar", "displayName": "Jason Kotchoff", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1", "updateAuthor": { "name": "cornflakesuperstar", "key": "cornflakesuperstar", "displayName": "Jason Kotchoff", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-02-06T05:57:55.000+0000", "updated": "2015-02-06T05:57:55.000+0000" }, { "id": "352408", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "as [~blainhamon] has mentioned,\r\nAccording to apple reference here:\r\nhttps://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/index.html#//apple_ref/occ/instm/UIViewController/disablesAutomaticKeyboardDismissal\r\n\"The default implementation of this method returns YES when the modal presentation style of the view controller is set to UIModalPresentationFormSheet and returns NO for other presentation styles.\"\r\nSince we support the blur method, it should be ok to default the mentioned method to NO for all cases since it only affects UIModalPresentationFormSheet.\r\nPR here:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/6846", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-05-13T07:21:54.000+0000", "updated": "2015-05-13T07:21:54.000+0000" }, { "id": "354713", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\n\r\nThe textfield is dismissed as expected.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.1.0.201505071004\r\nTi SDK : 4.1.0.v20150605164428\r\nTi CLI : 4.0.1\r\nAlloy : 1.6.0\r\nMAC Yosemite : 10.10.3\r\nAppc npm : 4.0.0\r\nAppc CLI : 4.0.2-rc2\r\nNode: v0.10.37\r\nIOS Simulator: Iphone 5 IOS 8.3", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-06-10T00:13:26.000+0000", "updated": "2015-06-10T00:13:26.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }