{ "id": "160544", "key": "TIMOB-23442", "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": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-10-07T19:14:41.000+0000", "created": "2016-05-26T16:28:23.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "scrollview" ], "versions": [], "issuelinks": [ { "id": "54536", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "166517", "key": "TIMOB-24469", "fields": { "summary": "iOS: Dismiss keyboard on drag / interactively in ScrollView does not working if Textfield is outside ScrollView", "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": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-09T02:02:51.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": "Request from the Slack-community-member [~chmiiller]:\r\n{quote}\r\nI'm trying to dismiss the keyboard like the iMessage or Whastapp do, dragging the finger through it.\r\nI found the \"UIScrollViewKeyboardDismissMode\" constant on UIScrollView and as the Titanium ListView is a subclass of UIScrollView I thought that may be possible to achieve it.\r\nI saw here http://stackoverflow.com/questions/5143873/dismissing-the-keyboard-in-a-uiscrollview that this is possible simple setting the \"scrollView.keyboardDismissMode\" to \"UIScrollViewKeyboardDismissModeInteractive\".\r\nDo you have an idea on how we can make it?\r\n{quote}\r\n\r\nYes I do, we should expose it with a new property called {{keyboardDismissMode}} and allow the configuration of the three value \"none\", \"ondrag\" and \"interactive\", exposed as constants on the iOS-namespace.", "attachment": [], "flagged": false, "summary": "iOS: Dismiss keyboard on drag / interactively in ScrollView & ListView", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 722, "state": "closed", "name": "2016 Sprint 20 SDK", "startDate": "2016-09-28T16:50:17.299Z", "endDate": "2016-10-12T16:50:00.000Z", "completeDate": "2016-10-10T06:17:01.016Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "386911", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8021\r\n\r\nDemo (ScrollView):\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\nvar scroll = Ti.UI.createScrollView({\r\n\tkeyboardDismissMode: Ti.UI.iOS.KEYBOARD_DISMISS_MODE_INTERACTIVE,\r\n\tcontentHeight: 1500\r\n});\r\nvar field = Ti.UI.createTextField({\r\n\twidth: 300,\r\n\theight: 40,\r\n\ttop: 100,\r\n\tbackgroundColor: \"white\"\r\n});\r\n\r\nfield.addEventListener(\"focus\", function() {\r\n\tTi.API.warn(\"TextField focussed!\");\r\n});\r\n\r\nfield.addEventListener(\"blur\", function() {\r\n\tTi.API.warn(\"TextField blurred!\");\r\n});\r\n\r\nscroll.add(field);\r\nwin.add(scroll);\r\nwin.open();\r\n{code}\r\n\r\nDemo (ListView):\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar myTemplate = {\r\n\tchildTemplates: [{\r\n\t\ttype: \"Ti.UI.TextField\",\r\n\t\tevents: {\r\n\t\t\t\"focus\": function() {\r\n\t\t\t\tTi.API.warn(\"TextField focussed!\");\r\n\t\t\t},\r\n\t\t\t\"blur\": function() {\r\n\t\t\t\tTi.API.warn(\"TextField blurred!\");\r\n\t\t\t},\r\n\t\t},\r\n\t\tproperties: {\r\n\t\t\twidth: 300,\r\n\t\t\theight: 40,\r\n\t\t\tbackgroundColor: \"#ccc\"\r\n\t\t}\r\n\t}]\r\n};\r\n\r\nvar list = Ti.UI.createListView({\r\n\tkeyboardDismissMode: Ti.UI.iOS.KEYBOARD_DISMISS_MODE_INTERACTIVE,\r\n\ttemplates: { 'TestTemplate': myTemplate },\r\n\tdefaultItemTemplate: \"TestTemplate\"\r\n});\r\n\r\nvar items = [];\r\n\r\nfor (var i = 0; i < 50; i++) {\r\n\titems.push({\r\n\t\tproperties: {\r\n\t\t\ttemplate: \"TestTemplate\",\r\n\t\t}\r\n\t});\r\n}\r\n\r\nvar section = Ti.UI.createListSection({\r\n\titems: items\r\n});\r\n\r\nlist.setSections([section]);\r\nwin.add(list);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-05-26T16:32:54.000+0000", "updated": "2016-05-27T08:36:42.000+0000" }, { "id": "387017", "author": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Great! Since ListViews inherit UIScrollView is also possible to apply the keyboardDismissMode on it as well.\r\nA important thing to notice is that the textfield (if only one, in my case) could be placed outside the scrollView, in the window for example.\r\nHaving the textField in the bottom of window and a listView on it with keyboardDismissMode INTERACTIVE or DRAG is perfect for a simple chat window experience.\r\nSimple, clean and awesome work Hans, thank you so much!", "updateAuthor": { "name": "chmiiller", "key": "chmiiller", "displayName": "Carlos Henrique Zinato", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-27T09:01:36.000+0000", "updated": "2016-05-27T09:01:36.000+0000" }, { "id": "387539", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~apetkov] 6.0.0 is branched, you can go ahead and review / merge.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-06-03T19:24:35.000+0000", "updated": "2016-06-03T19:24:35.000+0000" }, { "id": "397444", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is my environment:\r\n\r\nNPM Version: 2.15.9\r\nNode Version: 4.5.0\r\nMac OS: 10.11.6\r\nAppc CLI: 5.5.0\r\nAppc CLI NPM: 4.2.7\r\nTitanium SDK version: 6.0.0.v20160927062927\r\nAppcelerator Studio, build: 4.7.1.201609100950\r\nXcode 8.0 GM\r\n\r\nI tried ScrollView and ListView demo codes independently. Here is what I saw:\r\n\r\nScrollView: Using Titanium SDK 5.5 GA, I was able to reproduce the issue where the keyboard did not dismiss on drag. I tried the same code using Titanium SDK 6.0, and the keyboard was dismissed on drag.\r\n\r\nListView: I tried on both Titanium SDK 5.5 and 6.0, and I am not able to dismiss on drag for either case. With this template (ListView), while dragging, the window attempts to scroll because the entire window is filled with the template, and the keyboard does not dismiss. I tried to narrow the width of the text fields, and I also tried to use fewer text cells, however, the space in the window contains the empty cells of the ListView template, and dragging only causes the window to attempt to scroll.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-28T00:55:24.000+0000", "updated": "2016-09-28T00:55:24.000+0000" }, { "id": "398127", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "I can confirm that my results match the behaviour described by [~amukherjee]. Using the latest 6.0.0 components, ScrollView correctly dismisses the keyboard on drag, however ListView does not.\r\n\r\nTested On:\r\niPhone 6 Plus 10.0.2 Device\r\niPhone 5S 9.3.5 Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 6.0.0.v20161004202820\r\nAppc Studio: 4.8.0.201609292239\r\nAppc NPM: 4.2.8-7\r\nApp CLI: 6.0.0-56\r\nXcode 8.0 \r\nNode v4.4.7\r\n\r\n*Reopening Ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-10-05T15:28:50.000+0000", "updated": "2016-10-05T15:28:50.000+0000" }, { "id": "398163", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The demo might be confusing, because there are so many text-fields. But the usual gesture that the user would do on a device works good for me. See [this video|https://www.dropbox.com/s/lp6yls6vsimkjbj/TIMOB-23442.mov?dl=0] in addition.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-05T18:26:58.000+0000", "updated": "2016-10-05T18:26:58.000+0000" }, { "id": "398220", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Ran the test cases for the ListView and can confirm that while the Keyboard is dismissed correctly on drag for Simulator, it does not work on Devices.", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-10-06T12:15:48.000+0000", "updated": "2016-10-06T12:15:48.000+0000" }, { "id": "398228", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Tested on both sim and device, using both kroll- and main-thread. Works like a charm.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-06T13:42:44.000+0000", "updated": "2016-10-06T13:42:44.000+0000" }, { "id": "398243", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "My experience is the same as Harry's. I am able to dismiss correctly on Simulator, but I cannot get the keyboard to dismiss on drag on Devices. I tried with iOS 10 and iOS 9 phones.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-06T15:11:29.000+0000", "updated": "2016-10-06T15:11:29.000+0000" }, { "id": "398348", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I am able to reproduce it with the packaged SDK, this is super strange. Must be something with our beloved precompiler macros again. I will take a closer look, the reopening is *valid*, good catch guys!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-07T14:29:23.000+0000", "updated": "2016-10-07T14:29:23.000+0000" }, { "id": "398399", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Dump me, the fix is here:\r\n\r\nPR (master): https://github.com/appcelerator/titanium_mobile/pull/8486\r\nPR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8487", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-10-07T19:14:03.000+0000", "updated": "2016-10-07T19:14:03.000+0000" }, { "id": "398499", "author": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I belive this ticket should be closed. I used this environment to verify the fix:\r\nNPM Version: 2.15.9\r\nNode Version: 4.5.0\r\nMac OS: 10.11.6\r\nAppc CLI: 5.5.0\r\nAppc CLI NPM: 4.2.7\r\nTitanium SDK version: 6.0.0.v20161009231510\r\nAppcelerator Studio, build: 4.8.0.201609290836\r\nXcode 8.0 GM\r\n\r\nI first tried Titanium SDK version 6.0.0.v20161006080234 (older build) and reproduced the dismiss on drag failure in the ListView scenario with an iPhone device. I tried it again with the newer build 6.0.0.v20161009231510, and the Keyboard was dismissed on drag correctly. Also to verify that the dismiss on drag continues to work correctly with ScrollView on the new build, I tried that on the iPhone device, and dismiss on drag continues to work correctly as well.", "updateAuthor": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-10-10T16:19:24.000+0000", "updated": "2016-10-10T16:19:24.000+0000" }, { "id": "410204", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "This should be reopened...if you place the TextField below the ScrollView or ListView, it doesn't work, which is needed for a chat style experience.", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-03-09T01:18:37.000+0000", "updated": "2017-03-09T01:18:37.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }