{ "id": "107079", "key": "TIMOB-15926", "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": "2017-07-10T21:35:59.000+0000", "created": "2012-12-26T09:48:38.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-07-10T21:36:03.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": "*Steps to reproduce*\r\n1. TextField in a ScrollView (same with TableView)\r\n2. Focus the TextField\r\n3. Remove the ScrollView without sending blur to the TextField\r\n4. Add the ScrollView again\r\n5. Observe layout bug\r\n\r\n*Test case*\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\nwin.backgroundColor = '#ccc';\r\n\r\nvar view4 = Ti.UI.createView({\r\n\ttop : 1,\r\n\tleft : 5,\r\n\tright : 5,\r\n\theight : 200,\r\n\tbackgroundColor : 'black',\r\n\tlayout : 'vertical'\r\n})\r\n\r\nvar scrollView = Titanium.UI.createScrollView({\r\n\ttop : 0,\r\n\theight : 50,\r\n\tlayout : 'vertical'\r\n});\r\n\r\nvar button1 = Titanium.UI.createButton({\r\n\ttop : 5,\r\n\twidth : 130,\r\n\theight : 40,\r\n\ttitle : 'unfocus'\r\n});\r\nbutton1.addEventListener('click', function() {\r\n\ttextfield.blur();\r\n});\r\n\r\nvar button2 = Titanium.UI.createButton({\r\n\ttop : 5,\r\n\twidth : 130,\r\n\theight : 40,\r\n\ttitle : 'show/hide'\r\n});\r\nbutton2.addEventListener('click', onClick);\r\n\r\nvar view = Ti.UI.createView({\r\n\tbackgroundColor : 'blue',\r\n\ttop : 5,\r\n\theight : 30,\r\n\tbottom : 5,\r\n\tlayout : 'horizontal',\r\n\thorizontalWrap : 'false',\r\n\twidth : Ti.UI.FILL\r\n})\r\nview.add(Ti.UI.createLabel({\r\n\tleft : 0,\r\n\twidth : 130\r\n}))\r\n\r\nvar textfield = Ti.UI.createTextField({\r\n\tleft : 5,\r\n\tright : 5,\r\n\theight : 35,\r\n\tvalue : \"test\",\r\n\tbackgroundColor : 'red',\r\n\twidth : Ti.UI.FILL\r\n})\r\nview.add(textfield)\r\nscrollView.add(view);\r\n\r\nview4.add(scrollView);\r\nview4.add(button1);\r\nview4.add(button2);\r\n\r\nvar button = Titanium.UI.createButton({\r\n\ttitle : 'show/hide',\r\n\theight : 40,\r\n\twidth : 200,\r\n\tbottom : 10\r\n});\r\nwin.add(button);\r\n\r\nvar added = false;\r\n\r\nfunction onClick() {\r\n\tif (added) {\r\n\t\twin.remove(view4);\r\n\t} else {\r\n\t\twin.add(view4);\r\n\t\ttextfield.focus();\r\n\t}\r\n\tadded = !added;\r\n}\r\n\r\nbutton.addEventListener('click', onClick);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Removing a TextField without blur results in layout issue", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "Titanium 3.1.0 master\r\niOS SDK 6.0\r\nSimulator/device", "comment": { "comments": [ { "id": "236198", "author": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hello,\r\n\r\nWhat are the steps to reproduce? I tried with the sample code, but I can't see anything weird. What should I see?", "updateAuthor": { "name": "dcassenti", "key": "dcassenti", "displayName": "Davide Cassenti", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-01-28T15:37:59.000+0000", "updated": "2013-01-28T15:37:59.000+0000" }, { "id": "236710", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "@Davide: just \n1 open\n2 click show/hide at the bottom\n3 without doing unfocus click show/hide in the \"dialog view.\n4 click show/hide at the bottom\n\n=> the textfield is out of place.\n\nDo the same thing by adding 3.a unfocus, and it will behave correctly\n\nI just did it in the ios simulator 6.0 with sdk 3.0.0.GA\n", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2013-01-31T12:36:53.000+0000", "updated": "2013-01-31T12:36:53.000+0000" }, { "id": "423803", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am unable to reproduce this issue with the following environment;\r\niPhone 6 (10.0)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1 GA\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.2\r\nTi CLI 5.0.14\r\nAlloy 1.9.11\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-07-10T21:35:59.000+0000", "updated": "2017-07-10T21:35:59.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }