{ "id": "117150", "key": "TIMOB-14544", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-02-25T18:01:39.000+0000", "created": "2013-07-12T21:38:11.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "event", "events", "ios", "keyboard" ], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-03-18T20:53:30.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": "keyboardFrameChanged event doesn't do much good as it is fired after the keyboard has already been displayed. to create responsive layouts with different keyboard sizes we need to know keyboard size BEFORE the keyboard is displayed.\r\n\r\niphone/Classes/AppModule.m line 386-407 could be changed to something like this\r\n\r\n{code:objc}\r\n-(void)startup\r\n{\r\n\tWARN_IF_BACKGROUND_THREAD_OBJ;\t//NSNotificationCenter is not threadsafe!\r\n NSNotificationCenter * nc = [NSNotificationCenter defaultCenter];\r\n [nc addObserver:self selector:@selector(willShutdown:) name:kTiWillShutdownNotification object:nil];\r\n [nc addObserver:self selector:@selector(willShutdownContext:) name:kTiContextShutdownNotification object:nil];\r\n\r\n\r\n#if __IPHONE_OS_VERSION_MIN_ALLOWED >= __IPHONE_5_0\r\n if ([TiUtils isIOS5OrGreater])\r\n {\r\n [nc addObserver:self selector:@selector(keyboardFrameChanged:) name:UIKeyboardWillChangeFrameNotification object:nil];\r\n }\r\n#else\r\n \r\n [nc addObserver:self selector:@selector(keyboardFrameChanged:) name:UIKeyboardWillShowNotification object:nil];\r\n [nc addObserver:self selector:@selector(keyboardFrameChanged:) name:UIKeyboardWillHideNotification object:nil];\r\n [nc addObserver:self selector:@selector(timeChanged:) name:UIApplicationSignificantTimeChangeNotification object:nil];\r\n#endif\t\r\n \r\n [super startup];\r\n}\r\n{code}\r\n\r\nEither that or provide access to both Will and Did.\r\n\r\ne.x.\r\n\r\n{code:javascript}\r\nTi.App.addEventListener('keyboardFrameChanged', function(e){\r\n\tvar val = Ti.Platform.displayCaps.platformHeight - e.keyboardFrame.y;\r\n\t$.container.animate({bottom:val, duration:300}, function() {\r\n Ti.API.log(\"handleAnimateEnd\");\r\n });\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: keyboardFrameChanged before keyboard is shown", "creator": { "name": "troscoe", "key": "troscoe", "displayName": "Tristan Roscoe", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "troscoe", "key": "troscoe", "displayName": "Tristan Roscoe", "active": true, "timeZone": "America/New_York" }, "environment": "iOS", "closedSprints": [ { "id": 345, "state": "closed", "name": "2015 Sprint 04 SDK", "startDate": "2015-02-14T01:00:53.297Z", "endDate": "2015-03-01T01:00:00.000Z", "completeDate": "2015-02-28T15:39:43.652Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "261684", "author": { "name": "troscoe", "key": "troscoe", "displayName": "Tristan Roscoe", "active": true, "timeZone": "America/New_York" }, "body": "Also if you guys wanted to throw in UIKeyboardAnimationDurationUserInfoKey as an event property that would be extremely useful as well to match layout animation speed.", "updateAuthor": { "name": "troscoe", "key": "troscoe", "displayName": "Tristan Roscoe", "active": true, "timeZone": "America/New_York" }, "created": "2013-07-12T21:42:32.000+0000", "updated": "2013-07-12T21:42:32.000+0000" }, { "id": "344207", "author": { "name": "mike@teamworkpm.net", "key": "mike@teamworkpm.net", "displayName": "Mike Butler", "active": true, "timeZone": "Europe/London" }, "body": "Folks this one is killing us whenever we want do anything nice in response to the keyboard appearing. It's even worse when the keyboard is dismissed - whatever UI we've changed in response to the keyboard is left stranded mid-screen until after the keyboard has animated offscreen. No amount of subsequent animation can hide that ugliness. It makes it look like we haven't put in the time to polish the app. \r\n\r\nWe really do need is the will version of the call (with animationDuration if possible)\r\n\r\nAny chance this could be bumped up in priority? ", "updateAuthor": { "name": "mike@teamworkpm.net", "key": "mike@teamworkpm.net", "displayName": "Mike Butler", "active": true, "timeZone": "Europe/London" }, "created": "2015-02-24T16:46:13.000+0000", "updated": "2015-02-24T16:46:13.000+0000" }, { "id": "344208", "author": { "name": "findshorty", "key": "findshorty", "displayName": "ian young", "active": true, "timeZone": "Europe/London" }, "body": "Surely this is kind of fundamental isn't it?", "updateAuthor": { "name": "findshorty", "key": "findshorty", "displayName": "ian young", "active": true, "timeZone": "Europe/London" }, "created": "2015-02-24T17:16:06.000+0000", "updated": "2015-02-24T17:16:06.000+0000" }, { "id": "344226", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Test Case\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#ddd',\r\n fullscreen:true,\r\n orientationModes:[1,2,3,4]\r\n});\r\n \r\nvar ta = Ti.UI.createTextArea({\r\n width:Ti.UI.FILL,\r\n height:100,\r\n backgroundColor:'yellow',\r\n top:20\r\n})\r\n\r\nTi.App.addEventListener('keyboardframechanged',function(e){\r\n Ti.API.info(JSON.stringify(e));\r\n})\r\n\r\nwin.add(ta);\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-24T19:05:47.000+0000", "updated": "2015-02-24T19:05:47.000+0000" }, { "id": "344227", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pull pending\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6659", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-02-24T19:06:55.000+0000", "updated": "2015-02-24T19:06:55.000+0000" }, { "id": "346428", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nThe keyboardFrameChanged event is fired just before the keyboard is shown or hidden.\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.0.0.201503161602\r\nTi SDK : 4.0.0.v20150313181810\r\nCLI : 3.5.0-dev\r\nAlloy : 1.5.1\r\nMAC Yosemite : 10.10.2\r\nIphone 6 - IOS 8.2", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-03-18T20:53:17.000+0000", "updated": "2015-03-18T20:53:17.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }